BooleanKeyFrameCollection 类
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示 BooleanKeyFrame 对象集合。
public ref class BooleanKeyFrameCollection : System::Windows::Freezable, System::Collections::IList
public class BooleanKeyFrameCollection : System.Windows.Freezable, System.Collections.IList
type BooleanKeyFrameCollection = class
inherit Freezable
interface IList
interface ICollection
interface IEnumerable
type BooleanKeyFrameCollection = class
inherit Freezable
interface ICollection
interface IEnumerable
interface IList
Public Class BooleanKeyFrameCollection
Inherits Freezable
Implements IList
- 继承
- 实现
以下示例演示如何使用 BooleanAnimationUsingKeyFrames 动画。
<!-- 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>
此集合用作 的一部分, BooleanAnimationUsingKeyFrames 以沿一组关键帧对属性值进行动画处理 Boolean 。
<object>
<object.property>
oneOrMoreBooleanKeyFrames
</object.property>
</object>
oneOrMoreBooleanKeyFrames
使用对象元素语法声明的一个或多个 BooleanKeyFrame 对象。
Can |
获取一个值,该值指示是否可将对象变为不可修改。 (继承自 Freezable) |
Count |
获取包含在 BooleanKeyFrameCollection 中的关键帧的数目。 |
Dependency |
DependencyObjectType获取包装此实例的 CLR 类型的 。 (继承自 DependencyObject) |
Dispatcher |
获取与此 Dispatcher 关联的 DispatcherObject。 (继承自 DispatcherObject) |
Empty | |
Is |
获取一个值,该值指示集合大小是否可以更改。 |
Is |
获取一个值,该值指示对象当前是否可修改。 (继承自 Freezable) |
Is |
获取指示集合是否为只读的值。 |
Is |
获取一个值,该值指示此实例当前是否为密封的(只读)。 (继承自 DependencyObject) |
Is |
获取一个值,该值指示对集合的访问是否同步(线程安全)。 |
Item[Int32] |
获取或设置指定索引位置处的 BooleanKeyFrame。 |
Sync |
获取可用于同步对集合的访问的对象。 |
ICollection. |
从特定的 ICollection 索引开始,将 Array 的元素复制到一个 Array 中。 |
IList. |
将某项添加到 IList 中。 |
IList. |
确定 IList 是否包含特定值。 |
IList. |
确定 IList 中特定项的索引。 |
IList. |
在 IList 中的指定索引处插入一个项。 |
IList. |
获取或设置指定索引处的元素。 |
IList. |
从 IList 中移除特定对象的第一个匹配项。 |
Cast<TResult>(IEnumerable) |
将 IEnumerable 的元素强制转换为指定的类型。 |
Of |
根据指定类型筛选 IEnumerable 的元素。 |
As |
启用查询的并行化。 |
As |
将 IEnumerable 转换为 IQueryable。 |
产品 | 版本 |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |