DoubleKeyFrameCollection DoubleKeyFrameCollection DoubleKeyFrameCollection DoubleKeyFrameCollection Class

定義

表示 DoubleKeyFrame 物件的集合。Represents a collection of DoubleKeyFrame objects.

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
Public Class DoubleKeyFrameCollection
Inherits Freezable
Implements IList
繼承
實作

範例

下列範例示範如何使用DoubleAnimationUsingKeyFrames動畫。The following example demonstrates how to use a DoubleAnimationUsingKeyFrames animation.

<!-- 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沿著一組主要畫面格的屬性值。This collection is used as part of a DoubleAnimationUsingKeyFrames to animate a Double property value along a set of key frames.

XAML 隱含集合用法XAML Implicit Collection Usage

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

XAML 值XAML Values

oneOrMoreDoubleKeyFrameObjectElementsoneOrMoreDoubleKeyFrameObjectElements
一或多個DoubleKeyFrame宣告使用物件元素語法的物件。One or more DoubleKeyFrame objects, declared using object element syntax.

建構函式

DoubleKeyFrameCollection() DoubleKeyFrameCollection() DoubleKeyFrameCollection() DoubleKeyFrameCollection()

初始化 DoubleKeyFrameCollection 類別的新執行個體。Initializes a new instance of the DoubleKeyFrameCollection class.

屬性

CanFreeze CanFreeze CanFreeze CanFreeze

取得值,指出是否可以將物件設為不可修改。Gets a value that indicates whether the object can be made unmodifiable.

(Inherited from Freezable)
Count Count Count Count

取得 DoubleKeyFrameCollection 中所包含的主要畫面格數目。Gets the number of key frames contained in the DoubleKeyFrameCollection.

DependencyObjectType DependencyObjectType DependencyObjectType DependencyObjectType

取得包裝此執行個體之 CLRCLR 型別的 DependencyObjectTypeGets the DependencyObjectType that wraps the CLRCLR type of this instance.

(Inherited from DependencyObject)
Dispatcher Dispatcher Dispatcher Dispatcher

取得DispatcherDispatcherObject相關聯。Gets the Dispatcher this DispatcherObject is associated with.

(Inherited from DispatcherObject)
Empty Empty Empty Empty

取得空的 DoubleKeyFrameCollectionGets an empty DoubleKeyFrameCollection.

IsFixedSize IsFixedSize IsFixedSize IsFixedSize

取得值,指出集合大小是否可以變更。Gets a value that indicates if the collection size can ever change.

IsFrozen IsFrozen IsFrozen IsFrozen

取得值,該值表示物件目前是否可修改。Gets a value that indicates whether the object is currently modifiable.

(Inherited from Freezable)
IsReadOnly IsReadOnly IsReadOnly IsReadOnly

取得值,指出集合是否為唯讀。Gets a value that indicates if the collection is read-only.

IsSealed IsSealed IsSealed IsSealed

取得值,這個值表示此執行個體目前是否已密封 (唯讀)。Gets a value that indicates whether this instance is currently sealed (read-only).

(Inherited from DependencyObject)
IsSynchronized IsSynchronized IsSynchronized IsSynchronized

取得值,指示對集合的存取是否為同步的 (安全執行緒)。Gets a value that indicates whether access to the collection is synchronized (thread-safe).

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

取得或設定位在指定索引位置的 DoubleKeyFrameGets or sets the DoubleKeyFrame at the specified index position.

SyncRoot SyncRoot SyncRoot SyncRoot

取得物件,這個物件可以用來對集合進行同步存取。Gets an object that can be used to synchronize access to the collection.

方法

Add(DoubleKeyFrame) Add(DoubleKeyFrame) Add(DoubleKeyFrame) Add(DoubleKeyFrame)

DoubleKeyFrame 加入集合結尾。Adds a DoubleKeyFrame to the end of the collection.

CheckAccess() CheckAccess() CheckAccess() CheckAccess()

判斷呼叫的執行緒是否可以存取這個DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
Clear() Clear() Clear() Clear()

從集合中移除所有 DoubleKeyFrame 物件。Removes all DoubleKeyFrame objects from the collection.

ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

清除屬性的區域數值。Clears the local value of a property. 要清除的屬性是由 DependencyProperty 識別項所指定。The property to be cleared is specified by a DependencyProperty identifier.

(Inherited from DependencyObject)
ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey)

清除唯讀屬性的區域數值。Clears the local value of a read-only property. 要清除的屬性是由 DependencyPropertyKey 所指定。The property to be cleared is specified by a DependencyPropertyKey.

(Inherited from DependencyObject)
Clone() Clone() Clone() Clone()

建立這個 DoubleKeyFrameCollection 的可修改複製品,深層複製這個物件的值。Creates a modifiable clone of this DoubleKeyFrameCollection, making deep copies of this object's values. 當複製相依性屬性時,這個方法會複製資源參考和資料繫結 (但可能無法再解析),但不會複製動畫或它們目前的值。When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values.

CloneCore(Freezable) CloneCore(Freezable) CloneCore(Freezable) CloneCore(Freezable)

使這個執行個體成為指定之 DoubleKeyFrameCollection 的深層複本。Makes this instance a deep copy of the specified DoubleKeyFrameCollection. 當複製相依性屬性時,這個方法會複製資源參考和資料繫結 (但可能無法再解析),但不會複製動畫或它們目前的值。When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values.

CloneCurrentValue() CloneCurrentValue() CloneCurrentValue() CloneCurrentValue()

使用 Freezable 的目前值,建立它的可修改複製品 (深層複本)。Creates a modifiable clone (deep copy) of the Freezable using its current values.

(Inherited from Freezable)
CloneCurrentValueCore(Freezable) CloneCurrentValueCore(Freezable) CloneCurrentValueCore(Freezable) CloneCurrentValueCore(Freezable)

使用目前的屬性值,讓這個執行個體成為指定的 DoubleKeyFrameCollection 之可修改深層複本。Makes this instance a modifiable deep copy of the specified DoubleKeyFrameCollection using current property values. 不會複製資源參考、資料繫結和動畫,但是會複製其目前值。Resource references, data bindings, and animations are not copied, but their current values are.

CoerceValue(DependencyProperty) CoerceValue(DependencyProperty) CoerceValue(DependencyProperty) CoerceValue(DependencyProperty)

強制轉型所指定相依性屬性的值。Coerces the value of the specified dependency property. 叫用存在於呼叫 CoerceValueCallback 上相依性屬性之屬性中繼資料內所指定的任何 DependencyObject 函式,就可以達到這一點。This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.

(Inherited from DependencyObject)
Contains(DoubleKeyFrame) Contains(DoubleKeyFrame) Contains(DoubleKeyFrame) Contains(DoubleKeyFrame)

取得值,指出集合是否包含指定的 DoubleKeyFrameGets a value that indicates whether the collection contains the specified DoubleKeyFrame.

CopyTo(DoubleKeyFrame[], Int32) CopyTo(DoubleKeyFrame[], Int32) CopyTo(DoubleKeyFrame[], Int32) CopyTo(DoubleKeyFrame[], Int32)

將集合中的所有 DoubleKeyFrame 物件複製到指定的陣列。Copies all of the DoubleKeyFrame objects in a collection to a specified array.

CreateInstance() CreateInstance() CreateInstance() CreateInstance()

初始化 Freezable 類別的新執行個體。Initializes a new instance of the Freezable class.

(Inherited from Freezable)
CreateInstanceCore() CreateInstanceCore() CreateInstanceCore() CreateInstanceCore()

建立凍結的新 DoubleKeyFrameCollection 執行個體。Creates a new, frozen instance of DoubleKeyFrameCollection.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷提供的 DependencyObject 和目前的 DependencyObject 是否相等。Determines whether a provided DependencyObject is equivalent to the current DependencyObject.

(Inherited from DependencyObject)
Freeze() Freeze() Freeze() Freeze()

將目前的物件設為不可修改,並將其 IsFrozen 屬性設定為 trueMakes the current object unmodifiable and sets its IsFrozen property to true.

(Inherited from Freezable)
FreezeCore(Boolean) FreezeCore(Boolean) FreezeCore(Boolean) FreezeCore(Boolean)

將這個 DoubleKeyFrameCollection 執行個體設為唯讀,或判斷是否可以設為唯讀。Makes this instance of DoubleKeyFrameCollection read-only or determines whether it can be made read-only.

GetAsFrozen() GetAsFrozen() GetAsFrozen() GetAsFrozen()

建立的凍結的複本Freezable,使用基底 (非動畫) 屬性值。Creates a frozen copy of the Freezable, using base (non-animated) property values. 因為複本已凍結,則會傳址方式複製任何凍結子物件。Because the copy is frozen, any frozen sub-objects are copied by reference.

(Inherited from Freezable)
GetAsFrozenCore(Freezable) GetAsFrozenCore(Freezable) GetAsFrozenCore(Freezable) GetAsFrozenCore(Freezable)

使這個執行個體成為指定之 DoubleKeyFrameCollection 物件的複本。Makes this instance a clone of the specified DoubleKeyFrameCollection object.

GetCurrentValueAsFrozen() GetCurrentValueAsFrozen() GetCurrentValueAsFrozen() GetCurrentValueAsFrozen()

建立的凍結的複本Freezable使用目前的屬性值。Creates a frozen copy of the Freezable using current property values. 因為複本已凍結,則會傳址方式複製任何凍結子物件。Because the copy is frozen, any frozen sub-objects are copied by reference.

(Inherited from Freezable)
GetCurrentValueAsFrozenCore(Freezable) GetCurrentValueAsFrozenCore(Freezable) GetCurrentValueAsFrozenCore(Freezable) GetCurrentValueAsFrozenCore(Freezable)

使這個執行個體成為所指定 DoubleKeyFrameCollection 的凍結複本。Makes this instance a frozen clone of the specified DoubleKeyFrameCollection. 不會複製資源參考、資料繫結和動畫,但是會複製其目前值。Resource references, data bindings, and animations are not copied, but their current values are.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

傳回可逐一查看這個集合的列舉程式。Returns an enumerator that can iterate through the collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

取得這個 DependencyObject 的雜湊程式碼。Gets a hash code for this DependencyObject.

(Inherited from DependencyObject)
GetLocalValueEnumerator() GetLocalValueEnumerator() GetLocalValueEnumerator() GetLocalValueEnumerator()

建立特定的列舉值,以判斷哪些相依性屬性在此 DependencyObject 上具有本機設定的值。Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject.

(Inherited from DependencyObject)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

傳回 DependencyObject 的這個執行個體上之相依性屬性的目前有效值。Returns the current effective value of a dependency property on this instance of a DependencyObject.

(Inherited from DependencyObject)
IndexOf(DoubleKeyFrame) IndexOf(DoubleKeyFrame) IndexOf(DoubleKeyFrame) IndexOf(DoubleKeyFrame)

搜尋指定的 DoubleKeyFrame,並傳回整個集合內第一個符合項目之以零為起始的索引。Searches for the specified DoubleKeyFrame and returns the zero-based index of the first occurrence within the entire collection.

Insert(Int32, DoubleKeyFrame) Insert(Int32, DoubleKeyFrame) Insert(Int32, DoubleKeyFrame) Insert(Int32, DoubleKeyFrame)

DoubleKeyFrame 插入集合內的特定位置。Inserts a DoubleKeyFrame into a specific location within the collection.

InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty)

重新評估指定之相依性屬性的有效值。Re-evaluates the effective value for the specified dependency property

(Inherited from DependencyObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
OnChanged() OnChanged() OnChanged() OnChanged()

目前的 Freezable 物件遭到修改時進行呼叫。Called when the current Freezable object is modified.

(Inherited from Freezable)
OnFreezablePropertyChanged(DependencyObject, DependencyObject) OnFreezablePropertyChanged(DependencyObject, DependencyObject) OnFreezablePropertyChanged(DependencyObject, DependencyObject) OnFreezablePropertyChanged(DependencyObject, DependencyObject)

可確保,建立適當的內容指標DependencyObjectType剛才設定的資料成員。Ensures that appropriate context pointers are established for a DependencyObjectType data member that has just been set.

(Inherited from Freezable)
OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty) OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty) OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty) OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty)

這個成員支援 Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) 基礎結構,但是您不可以從程式碼直接使用它。This member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

(Inherited from Freezable)
OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs)

覆寫 OnPropertyChanged(DependencyPropertyChangedEventArgs)DependencyObject 實作也可以叫用任何 Changed 處理常式,以回應類型 Freezable 的變更相依性屬性。Overrides the DependencyObject implementation of OnPropertyChanged(DependencyPropertyChangedEventArgs) to also invoke any Changed handlers in response to a changing dependency property of type Freezable.

(Inherited from Freezable)
ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

傳回相依性屬性的區域值 (如果存在)。Returns the local value of a dependency property, if it exists.

(Inherited from DependencyObject)
ReadPreamble() ReadPreamble() ReadPreamble() ReadPreamble()

可確保Freezable從有效的執行緒進行存取。Ensures that the Freezable is being accessed from a valid thread. 繼承者Freezable必須呼叫這個方法的任何開頭APIAPI讀取不相依性屬性的資料成員。Inheritors of Freezable must call this method at the beginning of any APIAPI that reads data members that are not dependency properties.

(Inherited from Freezable)
Remove(DoubleKeyFrame) Remove(DoubleKeyFrame) Remove(DoubleKeyFrame) Remove(DoubleKeyFrame)

從集合中移除 DoubleKeyFrame 物件。Removes a DoubleKeyFrame object from the collection.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

移除集合中位於指定索引位置的 DoubleKeyFrameRemoves the DoubleKeyFrame at the specified index position from the collection.

SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object)

設定相依性屬性的值,而不需要變更其值來源。Sets the value of a dependency property without changing its value source.

(Inherited from DependencyObject)
SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object)

設定相依性屬性的區域值 (由相依性屬性的識別碼所指定)。Sets the local value of a dependency property, specified by its dependency property identifier.

(Inherited from DependencyObject)
SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object)

設定唯讀相依性屬性的區域數值 (由相依性屬性的 DependencyPropertyKey 識別項所指定)。Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.

(Inherited from DependencyObject)
ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty)

傳回值,這個值表示序列化程序是否應該序列化所提供相依性屬性的值。Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.

(Inherited from DependencyObject)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
VerifyAccess() VerifyAccess() VerifyAccess() VerifyAccess()

強制執行呼叫的執行緒可以存取這個DispatcherObjectEnforces that the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
WritePostscript() WritePostscript() WritePostscript() WritePostscript()

引發 FreezableChanged 事件,並叫用其 OnChanged() 方法。Raises the Changed event for the Freezable and invokes its OnChanged() method. 在任何 API 修改未以相依性屬性儲存的類別成員之後,衍生自 Freezable 的類別應該在 API 的結尾呼叫這個方法。Classes that derive from Freezable should call this method at the end of any API that modifies class members that are not stored as dependency properties.

(Inherited from Freezable)
WritePreamble() WritePreamble() WritePreamble() WritePreamble()

確認Freezable未凍結,從有效的執行緒內容進行存取。Verifies that the Freezable is not frozen and that it is being accessed from a valid threading context. Freezable 繼承者應該呼叫這個方法的任何開頭APIAPI寫入不是相依性屬性的資料成員。Freezable inheritors should call this method at the beginning of any APIAPI that writes to data members that are not dependency properties.

(Inherited from Freezable)

明確介面實作

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

從特定的 ICollection 索引開始,將 Array 的項目複製至 ArrayCopies the elements of the ICollection to an Array, starting at a particular Array index.

IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

將項目加入至 IListAdds an item to the IList.

IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

判斷 IList 是否包含特定值。Determines whether the IList contains a specific value.

IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

判斷 IList 中指定項目的索引。Determines the index of a specific item in the IList.

IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

將項目插入位於指定索引的 IListInserts an item to the IList at the specified index.

IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

在指定的索引位置上取得或設定項目。Gets or sets the element at the specified index.

IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

IList 移除特定物件之第一個符合的元素。Removes the first occurrence of a specific object from the IList.

事件

Changed Changed Changed Changed

發生時Freezable或它所包含的物件遭到修改。Occurs when the Freezable or an object it contains is modified.

(Inherited from Freezable)

Extension Methods

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

將轉換IEnumerableIQueryableConverts an IEnumerable to an IQueryable.

適用於

另請參閱