Skip to main content

IPlatformSettings Interface

Definition

Assembly:Avalonia.Base
Package:Avalonia

The Avalonia.Platform.IPlatformSettings interface represents a contract for accessing platform-specific settings and information. Some of these settings might be changed by used globally in the OS in runtime.

public interface IPlatformSettings

Methods

NameDescription
GetColorValuesGets current system color values including dark mode and accent colors.
GetDoubleTapSizeThe size of the rectangle around the location of a pointer down that a pointer up must occur within in order to register a double-tap gesture, in device-independent pixels.
GetDoubleTapTimeGets the maximum time that may occur between the first and second click of a double- tap gesture.
GetTapSizeThe size of the rectangle around the location of a pointer down that a pointer up must occur within in order to register a tap gesture, in device-independent pixels.

GetColorValues Method

Gets current system color values including dark mode and accent colors.

public Avalonia.Platform.PlatformColorValues GetColorValues()

Returns

Avalonia.Platform.PlatformColorValues

GetDoubleTapSize Method

The size of the rectangle around the location of a pointer down that a pointer up must occur within in order to register a double-tap gesture, in device-independent pixels.

public Avalonia.Size GetDoubleTapSize(Avalonia.Input.PointerType type)

Parameters

type Avalonia.Input.PointerType

The pointer type.

Returns

Avalonia.Size

GetDoubleTapTime Method

Gets the maximum time that may occur between the first and second click of a double- tap gesture.

public TimeSpan GetDoubleTapTime(Avalonia.Input.PointerType type)

Parameters

type Avalonia.Input.PointerType

Returns

TimeSpan

GetTapSize Method

The size of the rectangle around the location of a pointer down that a pointer up must occur within in order to register a tap gesture, in device-independent pixels.

public Avalonia.Size GetTapSize(Avalonia.Input.PointerType type)

Parameters

type Avalonia.Input.PointerType

The pointer type.

Returns

Avalonia.Size

Properties

NameDescription
HoldWaitDurationHolding duration between pointer press and when event is fired.
HotkeyConfigurationGet a configuration for platform-specific hotkeys in an Avalonia application.

HoldWaitDuration Property

Holding duration between pointer press and when event is fired.

public TimeSpan HoldWaitDuration { get; set; }

HotkeyConfiguration Property

Get a configuration for platform-specific hotkeys in an Avalonia application.

public Avalonia.Input.Platform.PlatformHotkeyConfiguration HotkeyConfiguration { get; set; }

Events

NameDescription
ColorValuesChangedRaises when current system color values are changed. Including changing of a dark mode and accent colors.

ColorValuesChanged Event

Raises when current system color values are changed. Including changing of a dark mode and accent colors.

public event EventHandler<Avalonia.Platform.PlatformColorValues> ColorValuesChanged