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 controls are displayed blank.

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 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>
            <theme:DeltaDesignTheme/>
            <!-- .... -->
        </Application.Styles>
    </Application>
    

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>