Skip to main content

ToString(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)

public string ToString(
string? format,
IFormatProvider? formatProvider
)
View Source

Parameters

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

IFormattable.ToString(String, IFormatProvider)

Exceptions

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

See Also

Reference

KeyGesture Class
ToString Overload
Avalonia.Input Namespace