Table of Contents

Register an Eremex Paint Theme

You need to add and register an Eremex paint theme to allow correct rendering of the Eremex controls. If no Eremex paint theme is found, the Eremex controls are displayed blank.

The Eremex paint theme also includes styles for common standard Avalonia controls. If you use standard Avalonia controls not supported by the Eremex theme, you must also register the Fluent theme. See Register the 'FluentTheme' Theme for Standard Avalonia Controls.

Add a NuGet Package with a Theme to Your Project

Include the Eremex.Avalonia.Themes.DeltaDesign NuGet package to your project. This package contains the DeltaDesign paint theme for the Eremex controls.

Register the Eremex Paint Theme

  • Open the App.axaml file in your project.

  • Add the following namespace to the Application object:

    xmlns:theme="clr-namespace:Eremex.AvaloniaUI.Themes.DeltaDesign;assembly=Eremex.Avalonia.Themes.DeltaDesign"
    
  • Include the <theme:DeltaDesignTheme/> to the Application.Styles collection.

    <Application 
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="DemoCenter.App"
    xmlns:theme="clr-namespace:Eremex.AvaloniaUI.Themes.DeltaDesign;assembly=Eremex.Avalonia.Themes.DeltaDesign"
    RequestedThemeVariant="Light">
    <!-- "Default" - The application's theme variant is defined by the system setting. 
        "Light" - Enables the Light theme variant.
        "Dark" - Enables the Dark theme variant. 
    -->
        <!-- .... -->
        <Application.Styles>
            <FluentTheme/>
            <theme:DeltaDesignTheme/>
            <!-- .... -->
        </Application.Styles>
    </Application>
    

Register the 'FluentTheme' Theme for Standard Avalonia Controls

The Eremex.Avalonia.Themes.DeltaDesign paint theme defines styles for common standard Avalonia controls, ensuring they are rendered consistently with the DeltaDesign paint theme. The standard Avalonia controls supported by the DeltaDesign theme include, but are not limited to: Button, Calendar, CheckBox, ContextMenu, Label, ListBox, ProgressBar, RadioButton, ScrollBar, ScrollViewer, Separator, Slider, TextBox, ToggleButton, ToggleSwitch, ToolTip, and UserControl. For the complete list of supported standard Avalonia controls, refer to the theme's source code at: Eremex Controls Themes

To ensure correct rendering of standard Avalonia controls that are not supported by the DeltaDesign theme, you need to include the FluentTheme theme in your project. The Eremex paint theme should be registered after the FluentTheme theme:

<!-- App.axaml file -->
<Application.Styles>
    <FluentTheme/>
    <theme:DeltaDesignTheme/>
</Application.Styles>

Choose the Light or Dark Theme Variant

The DeltaDesign theme supports two color variants, light and dark.

Set the Application.RequestedThemeVariant property (for instance, in the App.axaml file) to specify the theme's color variant.

<Application 
    RequestedThemeVariant="Default" ... >
    <!-- "Default" - The application's theme is defined by the system setting. 
         "Light" - Enables the Light theme.
         "Dark" - Enables the Dark theme. 
    -->
</Application>