Table of Contents

Struct DispatcherPriority

Namespace
Avalonia.Threading
Assembly
Avalonia.Base.dll

Defines the priorities with which jobs can be invoked on a Dispatcher.

public readonly struct DispatcherPriority : IEquatable<DispatcherPriority>, IComparable<DispatcherPriority>
Implements
Inherited Members

Fields

ApplicationIdle

The job will be processed when the application is idle.

public static readonly DispatcherPriority ApplicationIdle

Field Value

DispatcherPriority

AsyncRenderTargetResize

A special priority for platforms that resize the render target in asynchronous-ish matter, should be changed into event grouping in the platform backend render

[PrivateApi]
public static readonly DispatcherPriority AsyncRenderTargetResize

Field Value

DispatcherPriority

Background

The job will be processed after other non-idle operations have completed.

public static readonly DispatcherPriority Background

Field Value

DispatcherPriority

BeforeRender

A special platform hook for jobs to be executed before the normal render cycle

[PrivateApi]
public static readonly DispatcherPriority BeforeRender

Field Value

DispatcherPriority

ContextIdle

The job will be processed after background operations have completed.

public static readonly DispatcherPriority ContextIdle

Field Value

DispatcherPriority

Default

The lowest foreground dispatcher priority

public static readonly DispatcherPriority Default

Field Value

DispatcherPriority

Inactive

A dispatcher priority for jobs that shouldn't be executed yet

public static readonly DispatcherPriority Inactive

Field Value

DispatcherPriority

Input

The job will be processed with the same priority as input.

public static readonly DispatcherPriority Input

Field Value

DispatcherPriority

Invalid

Used internally in dispatcher code

public static readonly DispatcherPriority Invalid

Field Value

DispatcherPriority

Loaded

The job will be processed after layout and render but before input.

public static readonly DispatcherPriority Loaded

Field Value

DispatcherPriority

MaxValue

Maximum possible priority

public static readonly DispatcherPriority MaxValue

Field Value

DispatcherPriority

Normal

The job will be processed with normal priority.

public static readonly DispatcherPriority Normal

Field Value

DispatcherPriority

Render

The job will be processed with the same priority as render.

public static readonly DispatcherPriority Render

Field Value

DispatcherPriority

Send

The job will be processed before other asynchronous operations.

public static readonly DispatcherPriority Send

Field Value

DispatcherPriority

SystemIdle

The job will be processed when the system is idle.

public static readonly DispatcherPriority SystemIdle

Field Value

DispatcherPriority

UiThreadRender

A special priority for platforms with UI render timer or for forced full rasterization requests

[PrivateApi]
public static readonly DispatcherPriority UiThreadRender

Field Value

DispatcherPriority

Properties

Value

The integer value of the priority

public int Value { get; }

Property Value

int

Methods

CompareTo(DispatcherPriority)

public int CompareTo(DispatcherPriority other)

Parameters

other DispatcherPriority

Returns

int

Equals(DispatcherPriority)

public bool Equals(DispatcherPriority other)

Parameters

other DispatcherPriority

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

FromValue(int)

public static DispatcherPriority FromValue(int value)

Parameters

value int

Returns

DispatcherPriority

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Validate(DispatcherPriority, string)

public static void Validate(DispatcherPriority priority, string parameterName)

Parameters

priority DispatcherPriority
parameterName string

Operators

operator ==(DispatcherPriority, DispatcherPriority)

public static bool operator ==(DispatcherPriority left, DispatcherPriority right)

Parameters

left DispatcherPriority
right DispatcherPriority

Returns

bool

operator >(DispatcherPriority, DispatcherPriority)

public static bool operator >(DispatcherPriority left, DispatcherPriority right)

Parameters

left DispatcherPriority
right DispatcherPriority

Returns

bool

operator >=(DispatcherPriority, DispatcherPriority)

public static bool operator >=(DispatcherPriority left, DispatcherPriority right)

Parameters

left DispatcherPriority
right DispatcherPriority

Returns

bool

implicit operator int(DispatcherPriority)

public static implicit operator int(DispatcherPriority priority)

Parameters

priority DispatcherPriority

Returns

int

implicit operator DispatcherPriority(int)

public static implicit operator DispatcherPriority(int value)

Parameters

value int

Returns

DispatcherPriority

operator !=(DispatcherPriority, DispatcherPriority)

public static bool operator !=(DispatcherPriority left, DispatcherPriority right)

Parameters

left DispatcherPriority
right DispatcherPriority

Returns

bool

operator <(DispatcherPriority, DispatcherPriority)

public static bool operator <(DispatcherPriority left, DispatcherPriority right)

Parameters

left DispatcherPriority
right DispatcherPriority

Returns

bool

operator <=(DispatcherPriority, DispatcherPriority)

public static bool operator <=(DispatcherPriority left, DispatcherPriority right)

Parameters

left DispatcherPriority
right DispatcherPriority

Returns

bool