Condividi tramite


KeyEventArgs.IsRepeat Proprietà

Definizione

Ottiene un valore che indica se il tasto della tastiera a cui fa riferimento l'evento è un tasto ripetuto.

public:
 property bool IsRepeat { bool get(); };
public bool IsRepeat { get; }
member this.IsRepeat : bool
Public ReadOnly Property IsRepeat As Boolean

Valore della proprietà

true se la chiave viene ripetuta; in caso contrario, false. Non esiste alcun valore predefinito.

Esempio

Nell'esempio seguente viene verificato se la chiave associata a un'istanza di KeyEventArgs è una chiave ripetuta ottenendo lo stato della IsRepeat proprietà .

// e is an instance of KeyEventArgs.
// btnIsRepeat is a Button.
if (e.IsRepeat)
{
    btnIsRepeat.Background = Brushes.AliceBlue;
}
' e is an instance of KeyEventArgs.
' btnIsRepeat is a Button.
If e.IsRepeat Then
    btnIsRepeat.Background = Brushes.AliceBlue
End If

Si applica a

Vedi anche