Share via


MouseCapabilities.NumberOfButtons Property

Definition

Gets a value representing the number of buttons on the mouse. If multiple mice are present, it returns the number of buttons of the mouse which has maximum number of buttons.

public:
 property unsigned int NumberOfButtons { unsigned int get(); };
uint32_t NumberOfButtons();
public uint NumberOfButtons { get; }
var uInt32 = mouseCapabilities.numberOfButtons;
Public ReadOnly Property NumberOfButtons As UInteger

Property Value

UInt32

unsigned int

uint32_t

A value representing the number of buttons on the mouse. If multiple mice are present, it returns the number of buttons of the mouse which has maximum number of buttons.

Examples

The following code shows how to use this method.

function getMouseCapabilities() {
    var mouseCapabilities = new Windows.Devices.Input.MouseCapabilities();
    id("numberOfButtons").innerHTML = mouseCapabilities.NumberOfButtons;
}

Applies to

See also