This documentation is archived and is not being maintained.
BooleanKeyFrameCollection Class
Visual Studio 2008
Represents a collection of BooleanKeyFrame objects.
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
This collection is used as part of a BooleanAnimationUsingKeyFrames to animate a Boolean property value along a set of key frames.
The following example demonstrates how to use a BooleanAnimationUsingKeyFrames animation.
<!-- 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.BooleanKeyFrameCollection
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Freezable
System.Windows.Media.Animation.BooleanKeyFrameCollection
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: