当前位置: 首页>>代码示例>>C#>>正文


C# Storyboard.GetHashCode方法代码示例

本文整理汇总了C#中System.Windows.Media.Animation.Storyboard.GetHashCode方法的典型用法代码示例。如果您正苦于以下问题:C# Storyboard.GetHashCode方法的具体用法?C# Storyboard.GetHashCode怎么用?C# Storyboard.GetHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Media.Animation.Storyboard的用法示例。


在下文中一共展示了Storyboard.GetHashCode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnLoaded

 private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
 {
     m_thicknessAnimation = new ThicknessAnimation(new Thickness(0), new Duration(TimeSpan.FromMilliseconds(125)));
       m_storyboard = new Storyboard();
       string s = "s" + m_storyboard.GetHashCode();
       Resources.Add(s, m_storyboard);
       m_storyboard.Children.Add(m_thicknessAnimation);
       Storyboard.SetTarget(m_thicknessAnimation, m_contentControl);
       Storyboard.SetTargetProperty(m_thicknessAnimation, new PropertyPath(MarginProperty));
 }
开发者ID:grarup,项目名称:SharpE,代码行数:10,代码来源:HorizontalEdgeButtonScroll.cs

示例2: ChawAnimation

        private void ChawAnimation()
        {
            PathData.StrokeThickness = 0;
            PathData.Fill = new SolidColorBrush(BattlefieldCircumstantials.BlackColor);
            PathData.Data = Geometry.Parse("M0,0 M100,100 M50,50 L101,25 101,75");
            PathData.RenderTransformOrigin = new Point(0.5, 0.5);

            Panel.SetZIndex(PathData, 1);
            Panel.SetZIndex(this, 1);

            var translation = new ScaleTransform(1, 1);
            var translationName = "Chawing" + translation.GetHashCode();
            RegisterName(translationName, translation);
            PathData.RenderTransform = translation;

            var anim = new DoubleAnimation(1, 0, new Duration(TimeSpan.FromMilliseconds(200)))
            {
                //EasingFunction = new PowerEase { EasingMode = EasingMode.EaseIn },
                RepeatBehavior = RepeatBehavior.Forever,
                AutoReverse = true
            };

            var sb = new Storyboard();
            sb.Children.Add(anim);

            Storyboard.SetTargetName(sb, translationName);
            Storyboard.SetTargetProperty(sb, new PropertyPath(ScaleTransform.ScaleYProperty));
            var storyboardName = "s" + sb.GetHashCode();
            Resources.Add(storyboardName, sb);

            sb.Begin();
        }
开发者ID:kekal,项目名称:PACMAN,代码行数:32,代码来源:Puckman.cs

示例3: OnLoaded

 private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
 {
     if (m_contentControl == null) return;
       TransformGroup transformGroup = new TransformGroup();
       m_translateTransform = new TranslateTransform(0, 0);
       string translateTransformName = "t" + m_translateTransform.GetHashCode();
       RegisterName(translateTransformName, m_translateTransform);
       transformGroup.Children.Add(m_translateTransform);
       m_contentControl.RenderTransform = transformGroup;
       m_doubleAnimation = new DoubleAnimation(0, new Duration(TimeSpan.FromMilliseconds(125)));
       m_storyboard = new Storyboard();
       Resources.Add("s" + m_storyboard.GetHashCode(), m_storyboard);
       m_storyboard.Children.Add(m_doubleAnimation);
       Storyboard.SetTargetName(m_doubleAnimation, translateTransformName);
       Storyboard.SetTargetProperty(m_doubleAnimation, new PropertyPath(TranslateTransform.YProperty));
 }
开发者ID:grarup,项目名称:SharpE,代码行数:16,代码来源:VerticalEdgeButtonScroll.cs


注:本文中的System.Windows.Media.Animation.Storyboard.GetHashCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。