Skip to main content

KeyGestureFormatInfo Class

Provides platform specific formatting information for the KeyGesture class

Definition

Namespace: Avalonia.Input.Platform
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public sealed class KeyGestureFormatInfo : IFormatProvider
View Source
InheritanceObject → KeyGestureFormatInfo
ImplementsIFormatProvider

Constructors

KeyGestureFormatInfo(IReadOnlyDictionary(Key, String), String, String, String, String)Provides platform specific formatting information for the KeyGesture class

Properties

AltThe string used to represent Alt on the appropriate platform. Defaults to "Alt".
CtrlThe string used to represent Ctrl on the appropriate platform. Defaults to "Ctrl".
InvariantThe Invariant format. Only uses strings straight from the appropriate Enums.
MetaThe string used to represent Meta on the appropriate platform. Defaults to "Cmd".
ShiftThe string used to represent Shift on the appropriate platform. Defaults to "Shift".

Methods

Equals(Object)Determines whether the specified object is equal to the current object.
(Inherited from Object)
FormatKey(Key)Checks the platformKeyOverrides and s_commonKeyOverrides Dictionaries, in order, for the appropriate string to represent the given Key on this platform. NOTE: If platformKeyOverrides is null, this is assumed to be the Invariant and the Dictionaries are not checked. The plain Enum string is returned instead.
GetFormat(Type) 
GetHashCode()Serves as the default hash function.
(Inherited from Object)
GetInstance(IFormatProvider)Gets the most appropriate KeyGestureFormatInfo for the IFormatProvider requested. This will be, in order: 1. The provided IFormatProvider as a KeyGestureFormatInfo 2. The currently registered platform specific KeyGestureFormatInfo, if present. 3. The Invariant otherwise.
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a string that represents the current object.
(Inherited from Object)

See Also

Reference

Avalonia.Input.Platform Namespace