VisualTransition.GeneratedDuration 屬性

定義

取得或設定從某個狀態轉換到另一個狀態所需的時間。

public:
 property System::Windows::Duration GeneratedDuration { System::Windows::Duration get(); void set(System::Windows::Duration value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.DurationConverter))]
public System.Windows.Duration GeneratedDuration { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.DurationConverter))>]
member this.GeneratedDuration : System.Windows.Duration with get, set
Public Property GeneratedDuration As Duration

屬性值

從某個狀態轉換到另一個狀態所需的時間。

屬性

範例

下列範例會指定 控制項需要一半秒的時間進入 MouseOver 狀態。 如需整個範例,請參閱 建立 ControlTemplate 來自訂現有控制項的外觀

<!--Take one half second to trasition to the MouseOver state.-->
<VisualTransition To="MouseOver" 
                  GeneratedDuration="0:0:0.5" />

備註

您可以藉由設定 GeneratedDuration 屬性來指定轉換所需的時間。 當您設定 屬性時 GeneratedDuration ,您會指定轉換發生所需的時間。

適用於