MouseEventArgs.XButton2 Właściwość

Definicja

Pobiera stan drugiego rozszerzonego przycisku myszy.

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

Wartość właściwości

Bieżący stan drugiego 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 XButton2 właściwości to Pressed.

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

Uwagi

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

Dotyczy