當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。