Skip to main content

AvaloniaWaylandPlatformExtensions Class

Definition

Namespace:Avalonia
Assembly:Avalonia.Wayland
Package:Avalonia.Wayland

Avalonia.AppBuilder extensions for enabling the Wayland windowing backend.

public class AvaloniaWaylandPlatformExtensions

Inheritance: object -> AvaloniaWaylandPlatformExtensions

Methods

NameDescription
UseWaylandConfigures the application to use the Wayland windowing backend. Options can be supplied by registering a Avalonia.WaylandPlatformOptions instance with Avalonia.AvaloniaLocator.
UseWaylandWithFallbackConfigures the application to use the Wayland windowing backend when a usable Wayland compositor is available, falling back to the previously configured windowing backend otherwise. Call it after UseX11 or UsePlatformDetect, e. g. .UsePlatformDetect().UseWaylandWithFallback(). Does nothing on non-Linux platforms.

UseWayland Method

Configures the application to use the Wayland windowing backend. Options can be supplied by registering a Avalonia.WaylandPlatformOptions instance with Avalonia.AvaloniaLocator.

public Avalonia.AppBuilder UseWayland(Avalonia.AppBuilder builder)

Parameters

builder Avalonia.AppBuilder

The application builder.

Returns

Avalonia.AppBuilder

The same builder for chaining.

UseWaylandWithFallback Method

Configures the application to use the Wayland windowing backend when a usable Wayland compositor is available, falling back to the previously configured windowing backend otherwise. Call it after UseX11 or UsePlatformDetect, e. g. .UsePlatformDetect().UseWaylandWithFallback(). Does nothing on non-Linux platforms.

public Avalonia.AppBuilder UseWaylandWithFallback(Avalonia.AppBuilder builder)

Parameters

builder Avalonia.AppBuilder

The application builder.

Returns

Avalonia.AppBuilder

The same builder for chaining.

Exceptions