MouseEventArgs.XButton1 Właściwość

Definicja

Pobiera bieżący stan pierwszego rozszerzonego przycisku myszy.

public:
 property System::Windows::Input::MouseButtonState XButton1 { System::Windows::Input::MouseButtonState get(); };
public System.Windows.Input.MouseButtonState XButton1 { get; }
member this.XButton1 : System.Windows.Input.MouseButtonState
Public ReadOnly Property XButton1 As MouseButtonState

Wartość właściwości

Bieżący stan pierwszego rozszerzonego przycisku myszy, czyli Pressed lub Released. Nie ma żadnej wartości domyślnej.

Przykłady

Poniższy przykład wyświetla komunikat, jeśli stan XButton1 właściwości to Pressed.

if (e.XButton1 == MouseButtonState.Pressed)
{
    MessageBox.Show("The XButton1 Mouse Button is pressed");
}
If e.XButton1 = MouseButtonState.Pressed Then
    MessageBox.Show("The XButton1 Mouse Button is pressed")
End If

Uwagi

Klasa Mouse udostępnia dodatkowe właściwości i metody określania stanu myszy.

Dotyczy