Mouse.RightButton 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 right button.
public:
static property System::Windows::Input::MouseButtonState RightButton { System::Windows::Input::MouseButtonState get(); };
public static System.Windows.Input.MouseButtonState RightButton { get; }
static member RightButton : System.Windows.Input.MouseButtonState
Public Shared ReadOnly Property RightButton As MouseButtonState
Property Value
The state of the right mouse button.
Examples
The following example shows how to determine whether the right mouse button is pressed by checking if the state of the RightButton 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.RightButton == MouseButtonState.Pressed)
{
UpdateSampleResults("Right Button Pressed");
}
If Mouse.RightButton = MouseButtonState.Pressed Then
UpdateSampleResults("Right Button Pressed")
End If
Applies to
See also
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา