UIPropertyMetadata.IsAnimationProhibited UIPropertyMetadata.IsAnimationProhibited UIPropertyMetadata.IsAnimationProhibited UIPropertyMetadata.IsAnimationProhibited Property

定義

取得或設定值,這個值宣告是否應停用套用包含中繼資料執行個體之相依性屬性上的動畫。Gets or sets a value declaring whether animations should be disabled on the dependency property where the containing metadata instance is applied.

public:
 property bool IsAnimationProhibited { bool get(); void set(bool value); };
public bool IsAnimationProhibited { get; set; }
member this.IsAnimationProhibited : bool with get, set
Public Property IsAnimationProhibited As Boolean

屬性值

true 表示不允許動畫,false 表示允許動畫。true indicates that animations are disallowed; false indicates that animations are allowed. 預設值為 false (允許動畫)。The default is false (animations allowed).

備註

一般而言中, 可用的預設相依性屬性Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)架構實作APIAPIs可以動畫顯示。In general, the default dependency properties available in the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) framework implementation APIAPIs can be animated. 您可能會將這個屬性設定為true您自己的自訂相依性屬性,若要停用動畫在其上的中繼資料。You might set this property to true in the metadata of your own custom dependency property to disable animations on it.

如果此值的屬性true嘗試用作成為動畫目標,執行階段例外狀況就會引發。If a property with this value true attempts to be used as an animation target, a runtime exception will be raised.

任何屬性的衍生類別PropertyMetadata通常會定義為讀寫的物件模型中。Properties on any derived classes of PropertyMetadata are normally defined in the object model as read-write. 這是讓它們可以調整執行個體初始化後。This is so they can be adjusted after initialization of the instance. 不過,一旦中繼資料的一部分的呼叫消耗RegisterAddOwner,或OverrideMetadata屬性系統會將密封該中繼資料執行個體,傳遞的中繼資料特性的任何屬性現在會被視為不變。However, once the metadata is consumed as part of a call to Register, AddOwner, or OverrideMetadata, the property system will seal that metadata instance and any properties that convey the specifics of the metadata are now considered immutable. 嘗試設定IsAnimationProhibited一旦IsSealedtrue此中繼資料執行個體將會引發例外狀況。Attempting to set IsAnimationProhibited once IsSealed is true on this metadata instance will raise an exception.

適用於