Table of Contents

Interface IUiDispatcher

Namespace
DotNetQuery.Mvvm
Assembly
DotNetQuery.Mvvm.dll

Marshals work onto the UI thread so that INotifyPropertyChanged notifications are raised where bindings expect them.

The default implementation is SynchronizationContextUiDispatcher. Supply a platform-specific implementation to target the platform's dispatcher directly — e.g. MainThread.BeginInvokeOnMainThread (MAUI), DispatcherQueue.TryEnqueue (WinUI/UNO), Dispatcher.BeginInvoke (WPF), or Dispatcher.UIThread.Post (Avalonia).

public interface IUiDispatcher

Methods

Post(Action)

Queues action for asynchronous execution on the UI thread.

void Post(Action action)

Parameters

action Action

The work to execute on the UI thread.