Skip to main content

BrowserPlatformOptions Class

Definition​

Assembly:Avalonia.Browser
Package:Avalonia.Browser
public class BrowserPlatformOptions

Inheritance: object -> BrowserPlatformOptions

Implements: IEquatable<BrowserPlatformOptions>

Constructors​

NameDescription
BrowserPlatformOptionsNo summary available.

BrowserPlatformOptions Constructor​

public BrowserPlatformOptions()

Methods​

NameDescription
<Clone>$No summary available.
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.
ToStringNo summary available.

<Clone>$ Method​

public Avalonia.Browser.BrowserPlatformOptions <Clone>$()

Returns​

Avalonia.Browser.BrowserPlatformOptions

Equals overloads​

Equals Method​

public bool Equals(Avalonia.Browser.BrowserPlatformOptions other)
Parameters​

other Avalonia.Browser.BrowserPlatformOptions

Returns​

bool

Equals Method​

public bool Equals(object obj)
Parameters​

obj object

Returns​

bool

GetHashCode Method​

public int GetHashCode()

Returns​

int

ToString Method​

public string ToString()

Returns​

string

Properties​

NameDescription
AvaloniaServiceWorkerScopeIf Avalonia.Browser.BrowserPlatformOptions.RegisterAvaloniaServiceWorker is enabled, it is possible to redefine scope for the worker. By default, current domain root is used as a scope.
FrameworkAssetPathResolverDefines paths where avalonia modules and service locator should be resolved. If null, default path resolved depending on the backend (browser or blazor) is used.
PreferFileDialogPolyfillAvalonia uses "native-file-system-adapter" polyfill for the file dialogs. If native implementation is available, by default it is used. This property forces polyfill to be always used. For more details, see https://github.com/jimmywarting/native-file-system-adapter#a-note-when-downloading-with-the-polyfilled-version.
PreferManagedThreadDispatcherDefines if Avalonia should create a controlled dispatcher loop on the web worker thread. If used only when WasmEnableThreads is set to true. Default value is true.
RegisterAvaloniaServiceWorkerDefines if the service worker used by Avalonia should be registered. If registered, service worker can work as a save file picker fallback on the browsers that don't support native implementation. For more details, see https://github.com/jimmywarting/native-file-system-adapter#a-note-when-downloading-with-the-polyfilled-version.
RenderingModeGets or sets Avalonia rendering modes with fallbacks. The first element in the array has the highest priority.

AvaloniaServiceWorkerScope Property​

If Avalonia.Browser.BrowserPlatformOptions.RegisterAvaloniaServiceWorker is enabled, it is possible to redefine scope for the worker. By default, current domain root is used as a scope.

public string AvaloniaServiceWorkerScope { get; set; }

FrameworkAssetPathResolver Property​

Defines paths where avalonia modules and service locator should be resolved. If null, default path resolved depending on the backend (browser or blazor) is used.

public Func<string, string> FrameworkAssetPathResolver { get; set; }

PreferFileDialogPolyfill Property​

Avalonia uses "native-file-system-adapter" polyfill for the file dialogs. If native implementation is available, by default it is used. This property forces polyfill to be always used. For more details, see https://github.com/jimmywarting/native-file-system-adapter#a-note-when-downloading-with-the-polyfilled-version.

public bool PreferFileDialogPolyfill { get; set; }

PreferManagedThreadDispatcher Property​

Defines if Avalonia should create a controlled dispatcher loop on the web worker thread. If used only when WasmEnableThreads is set to true. Default value is true.

public Nullable<bool> PreferManagedThreadDispatcher { get; set; }

RegisterAvaloniaServiceWorker Property​

Defines if the service worker used by Avalonia should be registered. If registered, service worker can work as a save file picker fallback on the browsers that don't support native implementation. For more details, see https://github.com/jimmywarting/native-file-system-adapter#a-note-when-downloading-with-the-polyfilled-version.

public bool RegisterAvaloniaServiceWorker { get; set; }

RenderingMode Property​

Gets or sets Avalonia rendering modes with fallbacks. The first element in the array has the highest priority.

public System.Collections.Generic.IReadOnlyList<Avalonia.Browser.BrowserRenderingMode> RenderingMode { get; set; }

Exceptions​