In This Article

InputGestureDisplayStringProvider Class

Defines a default implementation of IInputGestureDisplayStringProvider that can provide the display string of a gesture associated with an object.

public class InputGestureDisplayStringProvider : IInputGestureDisplayStringProvider
Inheritance:
object object
Implements:
IInputGestureDisplayStringProvider

Constructors

InputGestureDisplayStringProvider()

Initializes an instance of the class.

public InputGestureDisplayStringProvider()

Methods

GetDisplayString(object)

Gets the display string for a gesture associated with a source object.

public virtual string GetDisplayString(object source)
Parameter Type Description
source object

The source object.

Returns

string:

The display string for the source when available; otherwise null.

GetInputGestureDisplayString(InputGesture)

Gets the display string for an InputGesture.

protected virtual string GetInputGestureDisplayString(InputGesture gesture)
Parameter Type Description
gesture InputGesture

The InputGesture.

Returns

string:

The display string for the InputGesture.

Remarks

Override this method to provide a custom display string for an InputGesture.

GetKeyGestureDisplayString(KeyGesture)

Gets the display string for an KeyGesture.

protected virtual string GetKeyGestureDisplayString(KeyGesture gesture)
Parameter Type Description
gesture KeyGesture

The KeyGesture.

Returns

string:

The display string for the KeyGesture.

Remarks

Override this method to provide a custom display string for a KeyGesture.

GetRoutedCommandDisplayString(RoutedCommand)

Gets the display string for a gesture associated with a RoutedCommand.

protected virtual string GetRoutedCommandDisplayString(RoutedCommand routedCommand)
Parameter Type Description
routedCommand RoutedCommand

The RoutedCommand.

Returns

string:

The display string for the gesture of a RoutedCommand when available; otherwise null.

Remarks

Override this method to provide a custom display string for a RoutedCommand.

Inherited Members