本文整理汇总了C#中System.Windows.Controls.Panel.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.GetValue方法的具体用法?C# Panel.GetValue怎么用?C# Panel.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.Panel
的用法示例。
在下文中一共展示了Panel.GetValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateUnExplodingAnimation
internal static Storyboard CreateUnExplodingAnimation(DataSeries dataSeries, DataPoint dataPoint, Storyboard storyboard, Panel visual, Double targetValue)
{
#if WPF
if (storyboard != null && storyboard.GetValue(System.Windows.Media.Animation.Storyboard.TargetProperty) != null)
storyboard.Stop();
#else
if (storyboard != null)
storyboard.Stop();
#endif
Double fromValue = (Double)visual.GetValue(Canvas.TopProperty);
DoubleCollection values = Graphics.GenerateDoubleCollection(fromValue, targetValue);
DoubleCollection frames = Graphics.GenerateDoubleCollection(0, .2);
List<KeySpline> splines = AnimationHelper.GenerateKeySplineList(frames.Count);
DoubleAnimationUsingKeyFrames topAnimation = PieChart.CreateDoubleAnimation(dataSeries, dataPoint, visual, "(Canvas.Top)", 0, frames, values, splines);
storyboard.Children.Add(topAnimation);
return storyboard;
}
示例2: GetIsFieldGroup
public static bool GetIsFieldGroup(Panel target)
{
return (bool)target.GetValue(IsFieldGroupProperty);
}
示例3: ApplyBubbleChartAnimation
/// <summary>
/// Apply animation for bubble chart
/// </summary>
/// <param name="pointGrid">Bubble chart grid</param>
/// <param name="storyboard">Stroyboard</param>
/// <param name="width">Width of the chart canvas</param>
/// <param name="height">Height of the chart canvas</param>
/// <returns>Storyboard</returns>
private static Storyboard ApplyBubbleChartAnimation(DataSeries currentDataSeries, Panel bubbleGrid, Storyboard storyboard, Double width, Double height)
{
TranslateTransform translateTransform = new TranslateTransform() { X = 0, Y = -height };
bubbleGrid.RenderTransform = translateTransform;
Random rand = new Random((Int32)DateTime.Now.Ticks);
Double begin = rand.NextDouble();
Double hPitchSize = width / 5;
DoubleCollection times1 = Graphics.GenerateDoubleCollection(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0);
DoubleCollection times2 = Graphics.GenerateDoubleCollection(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0);
DoubleCollection translateXValues;
DoubleCollection pitchFactors = Graphics.GenerateDoubleCollection(1, 15.0 / 23.0, 11.0 / 23.0, 7.0 / 23.0, 5.0 / 23.0, 3.0 / 23.0, 2.0 / 23.0, 1.0 / 23.0, 0.5 / 23.0, 0);
translateXValues = new DoubleCollection();
Double sign = 1;
if (rand.NextDouble() > 0.5)
{
if ((Double)bubbleGrid.GetValue(Canvas.LeftProperty) > width / 2) sign = -1;
else sign = 1;
}
else
{
if ((Double)bubbleGrid.GetValue(Canvas.LeftProperty) > width / 2) sign = 1;
else sign = -1;
}
// Generate pitch values
foreach (Double factor in pitchFactors)
translateXValues.Add(sign * hPitchSize * factor);
DoubleCollection translateYValues = Graphics.GenerateDoubleCollection(-height, 0, -height * 0.5, 0, -height * 0.25, 0, -height * 0.125, 0, -height * 0.0625, 0);
List<KeySpline> splines3 = AnimationHelper.GenerateKeySplineList(
new Point(0, 0), new Point(1, 1),
new Point(0, 0), new Point(1, 1),
new Point(0, 0), new Point(1, 1),
new Point(0, 0), new Point(1, 1),
new Point(0, 0), new Point(1, 1),
new Point(0, 0), new Point(1, 1),
new Point(0, 0), new Point(1, 1),
new Point(0, 0), new Point(1, 1),
new Point(0, 0), new Point(1, 1),
new Point(0, 0), new Point(1, 1));
List<KeySpline> splines4 = AnimationHelper.GenerateKeySplineList(
new Point(0, 0), new Point(1, 1),
new Point(0.5, 0), new Point(1, 1),
new Point(0, 0), new Point(0.5, 1),
new Point(0.5, 0), new Point(1, 1),
new Point(0, 0), new Point(0.5, 1),
new Point(0.5, 0), new Point(1, 1),
new Point(0, 0), new Point(0.5, 1),
new Point(0.5, 0), new Point(1, 1),
new Point(0, 0), new Point(0.5, 1),
new Point(0.5, 0), new Point(1, 1));
DoubleAnimationUsingKeyFrames xTranslateAnimation = AnimationHelper.CreateDoubleAnimation(currentDataSeries, translateTransform, "(TranslateTransform.X)", begin * 0.5 + 0.5, times1, translateXValues, splines3);
DoubleAnimationUsingKeyFrames yTranslateAnimation = AnimationHelper.CreateDoubleAnimation(currentDataSeries, translateTransform, "(TranslateTransform.Y)", begin * 0.5 + 0.5, times2, translateYValues, splines4);
storyboard.Children.Add(xTranslateAnimation);
storyboard.Children.Add(yTranslateAnimation);
return storyboard;
}