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:
System.Object Object
Implements:
IInputGestureDisplayStringProvider

Constructors

InputGestureDisplayStringProvider()

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 System.Object

The source object.

Returns

System.String:

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

GetInputGestureDisplayString(InputGesture)

Gets the display string for an System.Windows.Input.InputGesture.

protected virtual string GetInputGestureDisplayString(InputGesture gesture)
Parameter Type Description
gesture System.Windows.Input.InputGesture

The System.Windows.Input.InputGesture.

Returns

System.String:

The display string for the System.Windows.Input.InputGesture.

Remarks

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

GetKeyGestureDisplayString(KeyGesture)

Gets the display string for an System.Windows.Input.KeyGesture.

protected virtual string GetKeyGestureDisplayString(KeyGesture gesture)
Parameter Type Description
gesture System.Windows.Input.KeyGesture

The System.Windows.Input.KeyGesture.

Returns

System.String:

The display string for the System.Windows.Input.KeyGesture.

Remarks

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

GetRoutedCommandDisplayString(RoutedCommand)

Gets the display string for a gesture associated with a System.Windows.Input.RoutedCommand.

protected virtual string GetRoutedCommandDisplayString(RoutedCommand routedCommand)
Parameter Type Description
routedCommand System.Windows.Input.RoutedCommand

The System.Windows.Input.RoutedCommand.

Returns

System.String:

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

Remarks

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

Inherited Members

  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()