Mouse.XButton2 Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the state of the second extended button.
public:
static property System::Windows::Input::MouseButtonState XButton2 { System::Windows::Input::MouseButtonState get(); };
public static System.Windows.Input.MouseButtonState XButton2 { get; }
static member XButton2 : System.Windows.Input.MouseButtonState
Public Shared ReadOnly Property XButton2 As MouseButtonState
Property Value
The state of the second extended mouse button.
Examples
The following example shows how to determine whether the second extended mouse button is pressed by checking if the state of XButton2 is equal to the MouseButtonState enumeration value Pressed. If the button is pressed, a method is called which updates display elements in the sample.
if (Mouse.XButton2 == MouseButtonState.Pressed)
{
UpdateSampleResults("Second Extended Button Pressed");
}
If Mouse.XButton2 = MouseButtonState.Pressed Then
UpdateSampleResults("Second Extended Button Pressed")
End If
Applies to
See also
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.