本文整理汇总了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));
}
示例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();
}
示例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));
}