Skip to main content

AppBuilder Class

Initializes platform-specific services for an Application.

Definition

Namespace: Avalonia
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

public sealed class AppBuilder
View Source
InheritanceObject → AppBuilder

Properties

AfterPlatformServicesSetupCallback 
AfterSetupCallbackGets a method to call after the Application is setup.
ApplicationTypeGets the type of the Instance (even if it's not created yet)
InstanceGets the Application instance being initialized.
LifetimeOverrideGets a method to override a lifetime factory.
Obsolete.
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.
WindowingSubsystemInitializerGets or sets a method to call the initialize the windowing subsystem.
WindowingSubsystemNameGets the name of the currently selected windowing subsystem.

Methods

AfterPlatformServicesSetup(Action(AppBuilder)) 
AfterSetup(Action(AppBuilder)) 
Configure(TApp)()Begin configuring an Application.
Configure(TApp)(Func(TApp))Begin configuring an Application.
ConfigureFonts(Action(FontManager))Registers an action that is executed with the current font manager.
Equals(Object)Determines whether the specified object is equal to the current object.
(Inherited from Object)
GetHashCode()Serves as the default hash function.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
SetupWithLifetime(IApplicationLifetime)Sets up the platform-specific services for the application and initialized it with a particular lifetime, but does not run it.
SetupWithoutStarting()Sets up the platform-specific services for the application, but does not run it.
Start(AppBuilder.AppMainDelegate, String[]) 
ToString()Returns a string that represents the current object.
(Inherited from Object)
UseRenderingSubsystem(Action, String)Specifies a rendering subsystem to use.
UseRuntimePlatformSubsystem(Action, String)Specifies a runtime platform subsystem to use.
UseStandardRuntimePlatformSubsystem()Specifies a standard runtime platform subsystem to use.
UseWindowingSubsystem(Action, String)Specifies a windowing subsystem to use.
With(T)(Func(T))Configures platform-specific options
With(T)(T)Configures platform-specific options

Extension Methods

LogToTrace(LogEventLevel, String[])Logs Avalonia events to the Trace sink.
(Defined by LoggingExtensions)
SetupBrowserAppAsync(BrowserPlatformOptions)Loads avalonia javascript modules and configures browser backend.
(Defined by BrowserAppBuilder)
SetupWithClassicDesktopLifetime(String[], Action(IClassicDesktopStyleApplicationLifetime))Setups the Application with a IClassicDesktopStyleApplicationLifetime, but doesn't show the main window and doesn't run application main loop.
(Defined by ClassicDesktopStyleApplicationLifetimeExtensions)
StartBlazorAppAsync(BrowserPlatformOptions)Configures blazor backend, loads avalonia javascript modules and creates a single view lifetime.
(Defined by BlazorAppBuilder)
StartBrowserAppAsync(String, BrowserPlatformOptions)Configures browser backend, loads avalonia javascript modules and creates a single view lifetime from the passed parameter.
(Defined by BrowserAppBuilder)
StartWithClassicDesktopLifetime(String[], Action(IClassicDesktopStyleApplicationLifetime))Starts the Application with a IClassicDesktopStyleApplicationLifetime, shows main window and runs application main loop.
(Defined by ClassicDesktopStyleApplicationLifetimeExtensions)
StartWithClassicDesktopLifetime(String[], ShutdownMode)Starts the Application with a IClassicDesktopStyleApplicationLifetime, shows main window and runs application main loop.
(Defined by ClassicDesktopStyleApplicationLifetimeExtensions)
UseAndroid()
(Defined by AndroidApplicationExtensions)
UseAvaloniaNative()
(Defined by AvaloniaNativePlatformExtensions)
UseBrowser()
(Defined by BrowserAppBuilder)
UseDirect2D1()
(Defined by Direct2DApplicationExtensions)
UseiOS()
(Defined by IOSApplicationExtensions)
UseiOS(IAvaloniaAppDelegate)
(Defined by IOSApplicationExtensions)
UseManagedSystemDialogs()
(Defined by ManagedFileDialogExtensions)
UseManagedSystemDialogs(TWindow)()
(Defined by ManagedFileDialogExtensions)
UsePlatformDetect()
(Defined by AppBuilderDesktopExtensions)
UseReactiveUI()Initializes ReactiveUI framework to use with Avalonia. Registers Avalonia scheduler, an activation for view fetcher, a template binding hook. Remember to call this method if you are using ReactiveUI in your application.
(Defined by AppBuilderExtensions)
UseSkia()Enable Skia renderer.
(Defined by SkiaApplicationExtensions)
UseWin32()
(Defined by Win32ApplicationExtensions)
UseX11()
(Defined by AvaloniaX11PlatformExtensions)
WithInterFont()
(Defined by AppBuilderExtension)
WithSystemFontSource(Uri)
(Defined by SystemFontAppBuilderExtension)

See Also

Reference

Avalonia Namespace