Mouse.LeftButton 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 left button of the mouse.
public:
static property System::Windows::Input::MouseButtonState LeftButton { System::Windows::Input::MouseButtonState get(); };
public static System.Windows.Input.MouseButtonState LeftButton { get; }
static member LeftButton : System.Windows.Input.MouseButtonState
Public Shared ReadOnly Property LeftButton As MouseButtonState
Property Value
The state of the left mouse button.
Examples
The following example shows how to determine whether the left mouse button is pressed by checking if the state of the LeftButton 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.LeftButton == MouseButtonState.Pressed)
{
UpdateSampleResults("Left Button Pressed");
}
If Mouse.LeftButton = MouseButtonState.Pressed Then
UpdateSampleResults("Left Button Pressed")
End If
Applies to
See also
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.