Export (0) Print
Expand All
Expand Minimize

UIElement.GetAnimationBaseValue Method

Returns the base property value for the specified property on this element, disregarding any possible animated value from a running or stopped animation.

Namespace: System.Windows
Assembly: PresentationCore (in presentationcore.dll)

public Object GetAnimationBaseValue (
	DependencyProperty dp
)
public final Object GetAnimationBaseValue (
	DependencyProperty dp
)
public final function GetAnimationBaseValue (
	dp : DependencyProperty
) : Object
You cannot use methods in XAML.

Parameters

dp

The dependency property to check.

Return Value

The property value as if no animations are attached to the specified dependency property.

If no animations are attached to the property, then the GetAnimationBaseValue return value is always identical to the GetValue return value. If there are animations attached, then all possible animation derived values including the start and stop values are ignored, and the property value is determined based on all other possible inputs. For more information, see Dependency Property Value Precedence.

The following example implements a handler that reports the base value of an animated Width property on a Button, as well as the base value of a transform.

// Display the base value for Button.Width and RotateTransform.Angle.
private void animatedButton_Clicked(object sender, RoutedEventArgs e)
{
    Button animatedButton = (Button)sender;
    MessageBox.Show("Button width base value: " + 
        animatedButton.GetAnimationBaseValue(Button.WidthProperty)
        + "\nRotateTransform base value: " +
        animatedRotateTransform.GetAnimationBaseValue(RotateTransform.AngleProperty));

}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft