Skip to main content

AppBuilder Class

Definition​

Namespace:Avalonia
Assembly:Avalonia.Controls
Package:Avalonia

Initializes platform-specific services for an Avalonia.Application.

public class AppBuilder

Inheritance: object -> AppBuilder

Methods​

NameDescription
AfterPlatformServicesSetupNo summary available.
AfterSetupNo summary available.
Configure (2 overloads)No summary available.
ConfigureFontsNo summary available.
SetupWithLifetimeSets up the platform-specific services for the application and initialized it with a particular lifetime, but does not run it.
SetupWithoutStartingSets up the platform-specific services for the application, but does not run it.
StartNo summary available.
UseRenderingSubsystemSpecifies a rendering subsystem to use.
UseRuntimePlatformSubsystemSpecifies a runtime platform subsystem to use.
UseStandardRuntimePlatformSubsystemSpecifies a standard runtime platform subsystem to use.
UseTextShapingSubsystemSpecifies a text shaping subsystem to use.
UseWindowingSubsystemSpecifies a windowing subsystem to use.
With (2 overloads)No summary available.
WithDataAnnotationsValidationAdds support for validation using System.ComponentModel.DataAnnotations.

AfterPlatformServicesSetup Method​

public Avalonia.AppBuilder AfterPlatformServicesSetup(Action<Avalonia.AppBuilder> callback)

Parameters​

callback Action<Avalonia.AppBuilder>

Returns​

Avalonia.AppBuilder

AfterSetup Method​

public Avalonia.AppBuilder AfterSetup(Action<Avalonia.AppBuilder> callback)

Parameters​

callback Action<Avalonia.AppBuilder>

Returns​

Avalonia.AppBuilder

Configure overloads​

Configure Method​

public Avalonia.AppBuilder Configure<TApp>()
Type Parameters​

TApp

Returns​

Avalonia.AppBuilder

Configure Method​

public Avalonia.AppBuilder Configure<TApp>(Func<TApp> appFactory)
Parameters​

appFactory Func<TApp>

Type Parameters​

TApp

Returns​

Avalonia.AppBuilder

ConfigureFonts Method​

public Avalonia.AppBuilder ConfigureFonts(Action<Avalonia.Media.FontManager> action)

Parameters​

action Action<Avalonia.Media.FontManager>

Returns​

Avalonia.AppBuilder

SetupWithLifetime Method​

Sets up the platform-specific services for the application and initialized it with a particular lifetime, but does not run it.

public Avalonia.AppBuilder SetupWithLifetime(Avalonia.Controls.ApplicationLifetimes.IApplicationLifetime lifetime)

Parameters​

lifetime Avalonia.Controls.ApplicationLifetimes.IApplicationLifetime

Returns​

Avalonia.AppBuilder

SetupWithoutStarting Method​

Sets up the platform-specific services for the application, but does not run it.

public Avalonia.AppBuilder SetupWithoutStarting()

Returns​

Avalonia.AppBuilder

Start Method​

public void Start(Avalonia.AppBuilder.AppMainDelegate main, string[] args)

Parameters​

main Avalonia.AppBuilder.AppMainDelegate

args string[]

UseRenderingSubsystem Method​

Specifies a rendering subsystem to use.

public Avalonia.AppBuilder UseRenderingSubsystem(Action initializer, string name)

Parameters​

initializer Action

The method to call to initialize the rendering subsystem.

name string

The name of the rendering subsystem.

Returns​

Avalonia.AppBuilder

An Avalonia.AppBuilder instance.

UseRuntimePlatformSubsystem Method​

Specifies a runtime platform subsystem to use.

public Avalonia.AppBuilder UseRuntimePlatformSubsystem(Action initializer, string name)

Parameters​

initializer Action

The method to call to initialize the runtime platform subsystem.

name string

The name of the runtime platform subsystem.

Returns​

Avalonia.AppBuilder

An Avalonia.AppBuilder instance.

UseStandardRuntimePlatformSubsystem Method​

Specifies a standard runtime platform subsystem to use.

public Avalonia.AppBuilder UseStandardRuntimePlatformSubsystem()

Returns​

Avalonia.AppBuilder

An Avalonia.AppBuilder instance.

UseTextShapingSubsystem Method​

Specifies a text shaping subsystem to use.

public Avalonia.AppBuilder UseTextShapingSubsystem(Action initializer, string name)

Parameters​

initializer Action

The method to call to initialize the text shaping subsystem.

name string

The name of the text shaping subsystem.

Returns​

Avalonia.AppBuilder

An Avalonia.AppBuilder instance.

UseWindowingSubsystem Method​

Specifies a windowing subsystem to use.

public Avalonia.AppBuilder UseWindowingSubsystem(Action initializer, string name)

Parameters​

initializer Action

The method to call to initialize the windowing subsystem.

name string

The name of the windowing subsystem.

Returns​

Avalonia.AppBuilder

An Avalonia.AppBuilder instance.

With overloads​

With Method​

public Avalonia.AppBuilder With<T>(Func<T> options)
Parameters​

options Func<T>

Type Parameters​

T

Returns​

Avalonia.AppBuilder

With Method​

public Avalonia.AppBuilder With<T>(T options)
Parameters​

options T

Type Parameters​

T

Returns​

Avalonia.AppBuilder

WithDataAnnotationsValidation Method​

Adds support for validation using System.ComponentModel.DataAnnotations.

public Avalonia.AppBuilder WithDataAnnotationsValidation()

Returns​

Avalonia.AppBuilder

Properties​

NameDescription
AfterPlatformServicesSetupCallbackNo summary available.
AfterSetupCallbackGets a method to call after the Avalonia.Application is setup.
ApplicationTypeGets the type of the Instance (even if it's not created yet)
InstanceGets the Avalonia.Application instance being initialized.
RenderingSubsystemInitializerGets or sets a method to call the initialize the windowing subsystem.
RenderingSubsystemNameGets the name of the currently selected rendering subsystem.
RuntimePlatformServicesInitializerGets or sets a method to call the initialize the runtime platform services (e. g. AssetLoader)
RuntimePlatformServicesNameGets the name of the currently selected windowing subsystem.
TextShapingSubsystemInitializerGets or sets a method to call the initialize the text shaping subsystem.
TextShapingSubsystemNameGets the name of the currently selected text shaping subsystem.
WindowingSubsystemInitializerGets or sets a method to call the initialize the windowing subsystem.
WindowingSubsystemNameGets the name of the currently selected windowing subsystem.

AfterPlatformServicesSetupCallback Property​

public Action<Avalonia.AppBuilder> AfterPlatformServicesSetupCallback { get; set; }

AfterSetupCallback Property​

Gets a method to call after the Avalonia.Application is setup.

public Action<Avalonia.AppBuilder> AfterSetupCallback { get; set; }

ApplicationType Property​

Gets the type of the Instance (even if it's not created yet)

public Type ApplicationType { get; set; }

Instance Property​

Gets the Avalonia.Application instance being initialized.

public Avalonia.Application Instance { get; set; }

RenderingSubsystemInitializer Property​

Gets or sets a method to call the initialize the windowing subsystem.

public Action RenderingSubsystemInitializer { get; set; }

RenderingSubsystemName Property​

Gets the name of the currently selected rendering subsystem.

public string RenderingSubsystemName { get; set; }

RuntimePlatformServicesInitializer Property​

Gets or sets a method to call the initialize the runtime platform services (e. g. AssetLoader)

public Action RuntimePlatformServicesInitializer { get; set; }

RuntimePlatformServicesName Property​

Gets the name of the currently selected windowing subsystem.

public string RuntimePlatformServicesName { get; set; }

TextShapingSubsystemInitializer Property​

Gets or sets a method to call the initialize the text shaping subsystem.

public Action TextShapingSubsystemInitializer { get; set; }

TextShapingSubsystemName Property​

Gets the name of the currently selected text shaping subsystem.

public string TextShapingSubsystemName { get; set; }

WindowingSubsystemInitializer Property​

Gets or sets a method to call the initialize the windowing subsystem.

public Action WindowingSubsystemInitializer { get; set; }

WindowingSubsystemName Property​

Gets the name of the currently selected windowing subsystem.

public string WindowingSubsystemName { get; set; }