Condividi tramite


KeyEventArgs.IsUp Proprietà

Definizione

Ottiene un valore che indica se la chiave a cui fa riferimento l'evento è nello stato attivo.

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

Valore della proprietà

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

Esempio

Nell'esempio seguente viene verificato se la chiave associata a un'istanza di KeyEventArgs è impostata su recuperando lo stato della IsUp proprietà .

// e is an instance of KeyEventArgs.
// btnIsUp is a Button.
if (e.IsUp)
{
    btnIsUp.Background = Brushes.Red;
}
' e is an instance of KeyEventArgs.
' btnIsUp is a Button.
If e.IsUp Then
    btnIsUp.Background = Brushes.Red

Commenti

La Keyboard classe fornisce anche informazioni sullo stato dei tasti sulla tastiera. Ad esempio, il IsKeyUp metodo restituisce se un oggetto specificato è attivo.

Si applica a

Vedi anche