BooleanAnimationBase Class
.NET Framework 3.0
Abstract class that, when implemented, animates a Boolean value.
Namespace: System.Windows.Media.Animation
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Notes to Inheritors:
See the Custom Animations Overview for information about extending animation classes.
The following code example demonstrates how to use the derived BooleanAnimationUsingKeyFrames class using Extensible Application Markup Language (XAML).
<!-- Demonstrates a BooleanAnimationUsingKeyFrames. The animation is used to animate the IsEnabled property of a button. --> <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Microsoft.Samples.KeyFrameAnimations.BooleanAnimationUsingKeyFramesExample" Name="myRootElement" WindowTitle="KeyFrameBoolean Animation Example"> <StackPanel Orientation="Vertical" Margin="20"> <TextBlock> Click the button to animate the its IsEnabled property with a BooleanAnimationUsingKeyFrames animation. </TextBlock> <Button Name="myAnimatedButton" Margin="200">Click Me <Button.Triggers> <EventTrigger RoutedEvent="Button.Click"> <BeginStoryboard> <Storyboard> <BooleanAnimationUsingKeyFrames Storyboard.TargetName="myAnimatedButton" Storyboard.TargetProperty="(Button.IsEnabled)" Duration="0:0:4" FillBehavior="HoldEnd"> <!-- All the key frames below are DiscreteBooleanKeyFrames. Discrete key frames create sudden "jumps" between values (no interpolation). Only discrete key frames can be used for Boolean key frame animations. --> <DiscreteBooleanKeyFrame Value="False" KeyTime="0:0:0" /> <DiscreteBooleanKeyFrame Value="True" KeyTime="0:0:1" /> <DiscreteBooleanKeyFrame Value="False" KeyTime="0:0:2" /> <DiscreteBooleanKeyFrame Value="True" KeyTime="0:0:3" /> <DiscreteBooleanKeyFrame Value="False" KeyTime="0:0:3.5" /> <DiscreteBooleanKeyFrame Value="True" KeyTime="0:0:4" /> </BooleanAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger> </Button.Triggers> </Button> </StackPanel> </Page>
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Freezable
System.Windows.Media.Animation.Animatable
System.Windows.Media.Animation.Timeline
System.Windows.Media.Animation.AnimationTimeline
System.Windows.Media.Animation.BooleanAnimationBase
System.Windows.Media.Animation.BooleanAnimationUsingKeyFrames
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Freezable
System.Windows.Media.Animation.Animatable
System.Windows.Media.Animation.Timeline
System.Windows.Media.Animation.AnimationTimeline
System.Windows.Media.Animation.BooleanAnimationBase
System.Windows.Media.Animation.BooleanAnimationUsingKeyFrames
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.Community Additions
ADD
Show: