RepeatButton.Delay 屬性

定義

取得或設定時間 (以毫秒為單位),這個時間是按下 RepeatButton 等候開始重複的時間。 這個值必須為非負數。

public:
 property int Delay { int get(); void set(int value); };
[System.ComponentModel.Bindable(true)]
public int Delay { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.Delay : int with get, set
Public Property Delay As Integer

屬性值

時間 (以毫秒為單位),這個時間是按下 RepeatButton 等候開始重複的時間。 預設為 KeyboardDelay 的值。

屬性

範例

下列範例示範如何使用 Delay 屬性來設定在開始重複之前等候的時間 RepeatButton

<RepeatButton Width="100" DockPanel.Dock="Top" 
              Delay="500" Interval="100" 
              Click="Increase">
  Increase
</RepeatButton>

<TextBlock Name="valueText" 
           Width="100" DockPanel.Dock="Top" 
           TextAlignment="Center" FontSize="16">
  0
</TextBlock>

<RepeatButton Width="100" DockPanel.Dock="Top" 
              Delay="500" Interval="100" 
              Click="Decrease">
  Decrease
</RepeatButton>

備註

相依性屬性資訊

識別碼欄位 DelayProperty
設定為 的中繼資料屬性 true

適用於