DoubleKeyFrameCollection 类

定义

表示 DoubleKeyFrame 对象集合。

public ref class DoubleKeyFrameCollection : System::Windows::Freezable, System::Collections::IList
public class DoubleKeyFrameCollection : System.Windows.Freezable, System.Collections.IList
type DoubleKeyFrameCollection = class
    inherit Freezable
    interface IList
    interface ICollection
    interface IEnumerable
type DoubleKeyFrameCollection = class
    inherit Freezable
    interface ICollection
    interface IEnumerable
    interface IList
Public Class DoubleKeyFrameCollection
Inherits Freezable
Implements IList
继承
实现

示例

以下示例演示如何使用 DoubleAnimationUsingKeyFrames 动画。

<!-- This example shows how to use the DoubleAnimationUsingKeyFrames to create
an animation on the Canvas.Left attached property of a rectangle. -->
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Name="myRootElement"
  WindowTitle="KeyFrame Animations">

  <!-- Key frame animations enable you to create complex animations by specifying multiple destination values
      and controlling the animation's interpolation method. -->
  <Canvas>
    <!-- The position of this rectangle is animated using a key frame animation. -->
    <Rectangle Name="myRectangle"
      Canvas.Top="100"
      Canvas.Left="10"
      Height="100"
      Width="100"
      Stroke="Black"
      StrokeThickness="5">
      <Rectangle.Triggers>
        <EventTrigger RoutedEvent="Rectangle.Loaded">
          <BeginStoryboard>
            <Storyboard RepeatBehavior="Forever">

              <!-- Animate Canvas.Left attached property using 3 KeyFrames which animates
                the rectangle along a path. This animation repeats indefinitely. -->
              <DoubleAnimationUsingKeyFrames
                Storyboard.TargetName="myRectangle"
                Storyboard.TargetProperty="(Canvas.Left)">
                <DoubleAnimationUsingKeyFrames.KeyFrames>

                  <!-- Using a LinearDoubleKeyFrame, the rectangle moves steadily from its
                    starting position to 500 over the first 3 seconds.  -->
                  <LinearDoubleKeyFrame Value="500" KeyTime="0:0:3" />

                  <!-- Using a DiscreteDoubleKeyFrame, the rectangle suddenly appears at 500 after
                    the fourth second of the animation. -->
                  <DiscreteDoubleKeyFrame Value="400" KeyTime="0:0:4" />

                  <!-- Using a SplineDoubleKeyFrame, the rectangle moves back to its starting point. The
                    animation starts out slowly at first and then speeds up. This KeyFrame ends after the 6th
                    second. -->
                  <SplineDoubleKeyFrame KeySpline="0.6,0.0 0.9,0.00" Value="10" KeyTime="0:0:6" />
                </DoubleAnimationUsingKeyFrames.KeyFrames>
              </DoubleAnimationUsingKeyFrames>
            </Storyboard>
          </BeginStoryboard>
        </EventTrigger>
      </Rectangle.Triggers>
    </Rectangle>
  </Canvas>
</Page>

注解

此集合用作 的一部分, DoubleAnimationUsingKeyFrames 以沿一组关键帧对属性值进行动画处理 Double

XAML 隐式集合用法

<object>  
  <object.property>  
    oneOrMoreDoubleKeyFrameObjectElements  
  </object.property>  
</object>  

XAML 值

oneOrMoreDoubleKeyFrameObjectElements
使用对象元素语法声明的一个或多个 DoubleKeyFrame 对象。

构造函数

DoubleKeyFrameCollection()

初始化 DoubleKeyFrameCollection 类的新实例。

属性

CanFreeze

获取一个值,该值指示是否可将对象变为不可修改。

(继承自 Freezable)
Count

获取包含在 DoubleKeyFrameCollection 中的关键帧的数目。

DependencyObjectType

DependencyObjectType获取包装此实例的 CLR 类型的 。

(继承自 DependencyObject)
Dispatcher

获取与此 Dispatcher 关联的 DispatcherObject

(继承自 DispatcherObject)
Empty

获取空 DoubleKeyFrameCollection

IsFixedSize

获取一个值,该值指示集合大小是否可以更改。

IsFrozen

获取一个值,该值指示对象当前是否可修改。

(继承自 Freezable)
IsReadOnly

获取指示集合是否为只读的值。

IsSealed

获取一个值,该值指示此实例当前是否为密封的(只读)。

(继承自 DependencyObject)
IsSynchronized

获取一个值,该值指示对集合的访问是否同步(线程安全)。

Item[Int32]

获取或设置指定索引位置处的 DoubleKeyFrame

SyncRoot

获取可用于同步对集合的访问的对象。

方法

Add(DoubleKeyFrame)

DoubleKeyFrame 添加到集合的末尾。

CheckAccess()

确定调用线程是否可以访问此 DispatcherObject

(继承自 DispatcherObject)
Clear()

从集合中删除所有 DoubleKeyFrame 对象。

ClearValue(DependencyProperty)

清除属性的本地值。 要清除的属性由 DependencyProperty 标识符指定。

(继承自 DependencyObject)
ClearValue(DependencyPropertyKey)

清除只读属性的本地值。 要清除的属性由 DependencyPropertyKey 指定。

(继承自 DependencyObject)
Clone()

创建此 DoubleKeyFrameCollection 的可修改克隆,从而深度复制此对象的值。 在复制依赖项属性时,此方法会复制资源引用和数据绑定(但可能不再解析),但不复制动画或其当前值。

CloneCore(Freezable)

使此实例成为指定 DoubleKeyFrameCollection 的深层副本。 在复制依赖项属性时,此方法会复制资源引用和数据绑定(但可能不再解析),但不复制动画或其当前值。

CloneCurrentValue()

使用 Freezable 的当前值创建其可修改复本(深层副本)。

(继承自 Freezable)
CloneCurrentValueCore(Freezable)

使用当前的属性值使该实例成为指定 DoubleKeyFrameCollection 的可修改深层副本。 不复制资源引用、数据绑定和动画,而是复制其当前值。

CoerceValue(DependencyProperty)

对指定依赖属性的值进行强制。 通过对调用方 DependencyObject 上存在的依赖属性的属性元数据中所指定的任何 CoerceValueCallback 函数进行调用来完成此操作。

(继承自 DependencyObject)
Contains(DoubleKeyFrame)

获取一个指示集合是否包含指定 DoubleKeyFrame 的值。

CopyTo(DoubleKeyFrame[], Int32)

将集合中所有 DoubleKeyFrame 对象复制到指定的数组。

CreateInstance()

初始化 Freezable 类的新实例。

(继承自 Freezable)
CreateInstanceCore()

创建 DoubleKeyFrameCollection 的一个新的冻结实例。

Equals(Object)

确定提供的 DependencyObject 是否等效于当前 DependencyObject

(继承自 DependencyObject)
Freeze()

使当前对象不可修改,并且将其 IsFrozen 属性设置为 true

(继承自 Freezable)
FreezeCore(Boolean)

使 DoubleKeyFrameCollection 的此实例成为只读,或确定是否可使其成为只读。

GetAsFrozen()

使用基(未经过动画处理的)属性值创建 Freezable 的冻结副本。 由于副本已冻结,因此将通过引用复制任何冻结的子对象。

(继承自 Freezable)
GetAsFrozenCore(Freezable)

使此实例成为指定的 DoubleKeyFrameCollection 对象的克隆。

GetCurrentValueAsFrozen()

使用当前属性值创建 Freezable 的冻结副本。 由于副本已冻结,因此将通过引用复制任何冻结的子对象。

(继承自 Freezable)
GetCurrentValueAsFrozenCore(Freezable)

使此实例成为指定 DoubleKeyFrameCollection 的冻结复本。 不复制资源引用、数据绑定和动画,而是复制其当前值。

GetEnumerator()

返回一个可循环访问集合的枚举数。

GetHashCode()

获取此 DependencyObject 的哈希代码。

(继承自 DependencyObject)
GetLocalValueEnumerator()

创建一个专用的枚举数,用于确定哪些依赖项属性在此 DependencyObject 上具有以本地方式设置的值。

(继承自 DependencyObject)
GetType()

获取当前实例的 Type

(继承自 Object)
GetValue(DependencyProperty)

DependencyObject 的此实例返回依赖属性的当前有效值。

(继承自 DependencyObject)
IndexOf(DoubleKeyFrame)

在整个集合中搜索指定的 DoubleKeyFrame,并返回第一个匹配项的从零开始的索引。

Insert(Int32, DoubleKeyFrame)

DoubleKeyFrame 插入集合中的特定位置。

InvalidateProperty(DependencyProperty)

重新评估指定依赖属性的有效值。

(继承自 DependencyObject)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
OnChanged()

修改当前 Freezable 对象时调用。

(继承自 Freezable)
OnFreezablePropertyChanged(DependencyObject, DependencyObject)

确保为刚刚设置的 DependencyObjectType 数据成员建立适当的上下文指针。

(继承自 Freezable)
OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty)

此成员支持Windows Presentation Foundation (WPF) 基础结构,不应直接从代码使用。

(继承自 Freezable)
OnPropertyChanged(DependencyPropertyChangedEventArgs)

重写 OnPropertyChanged(DependencyPropertyChangedEventArgs)DependencyObject 实现,以同时调用任何响应类型 Freezable 不断变化的依赖属性的 Changed 处理程序。

(继承自 Freezable)
ReadLocalValue(DependencyProperty)

如果存在,则返回依赖属性的本地值。

(继承自 DependencyObject)
ReadPreamble()

确保正在从有效的线程访问 FreezableFreezable 的继承者必须在任何 API 一开始读取不属于依赖项对象的数据成员时调用此方法。

(继承自 Freezable)
Remove(DoubleKeyFrame)

从集合中移除 DoubleKeyFrame 对象。

RemoveAt(Int32)

从集合中的指定索引位置删除 DoubleKeyFrame

SetCurrentValue(DependencyProperty, Object)

设置依赖属性的值而不更改其值源。

(继承自 DependencyObject)
SetValue(DependencyProperty, Object)

设置依赖属性的本地值,该值由其依赖属性标识符指定。

(继承自 DependencyObject)
SetValue(DependencyPropertyKey, Object)

设置一个只读依赖属性的本地值,该值由依赖属性的 DependencyPropertyKey 标识符指定。

(继承自 DependencyObject)
ShouldSerializeProperty(DependencyProperty)

返回一个值,该值指示序列化进程是否应序列化所提供的依赖属性的值。

(继承自 DependencyObject)
ToString()

返回表示当前对象的字符串。

(继承自 Object)
VerifyAccess()

强制调用线程具有此 DispatcherObject 的访问权限。

(继承自 DispatcherObject)
WritePostscript()

引发 FreezableChanged 事件并调用其 OnChanged() 方法。 从 Freezable 派生的类应在修改的类成员不存储为依赖属性的任何 API 的末尾调用此方法。

(继承自 Freezable)
WritePreamble()

验证 Freezable 是否未被冻结,并且是否正在从有效的线程上下文中访问它。 Freezable 的继承项应当在任何 API 一开始写入不属于依赖项属性的数据成员时调用此方法。

(继承自 Freezable)

事件

Changed

在修改 Freezable 或其包含的对象时发生。

(继承自 Freezable)

显式接口实现

ICollection.CopyTo(Array, Int32)

从特定的 ICollection 索引开始,将 Array 的元素复制到一个 Array 中。

IList.Add(Object)

将某项添加到 IList 中。

IList.Contains(Object)

确定 IList 是否包含特定值。

IList.IndexOf(Object)

确定 IList 中特定项的索引。

IList.Insert(Int32, Object)

IList 中的指定索引处插入一个项。

IList.Item[Int32]

获取或设置指定索引处的元素。

IList.Remove(Object)

IList 中移除特定对象的第一个匹配项。

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。

AsParallel(IEnumerable)

启用查询的并行化。

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryable

适用于

另请参阅