Table of Contents

Method SetAppearance

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

SetAppearance(ApplicationAppearance)

Updates the application's appearance settings. Request using either system default or explicitly light or dark theme for the application.

public static PropertyUpdateResult SetAppearance(ApplicationAppearance appearance)

Parameters

appearance ApplicationAppearance

The new appearance settings to apply.

Returns

PropertyUpdateResult

A PropertyUpdateResult indicating the success or failure of the update. Returns Ok if the appearance was updated successfully, CannotChange if the appearance can't be changed any more because it's too late to do it but could be changed if done immediately on next program launch (only returned by Windows currently) or Failure if changing the appearance failed for some other reason.

Remarks

Use this method to apply custom appearance settings to the application, such as themes or color schemes.