KeyGestureToString(String, IFormatProvider) Method

Returns the current KeyGesture as a string formatted according to the format string and appropriate IFormatProvider

Definition

Namespace: Avalonia.Input
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public string ToString(
	string? format,
	IFormatProvider? formatProvider
)

Parameters

format  String
The format to use.
  • null or "" or "g" – The Invariant format, uses Enum.ToString() to format Keys.
  • "p" – Use platform specific formatting as registerd.
formatProvider  IFormatProvider
The IFormatProvider to use. If null, uses the appropriate provider registered in the Avalonia Locator, or Invariant.

Return Value

String
The formatted string.

Implements

IFormattableToString(String, IFormatProvider)

Exceptions

FormatExceptionThrown if the format string is not null, "", "g", or "p"

See Also