User Interface / UI Themes / Theme Builder
In This Topic
    Theme Builder
    In This Topic

    The easiest way to create a custom theme is to use the NOV Theme Builder.

     Running the Theme Builder

    You can run the NOV Theme Builder in any of the following 3 ways:

    1. Run the Nevron.Nov.ThemeBuilder application that comes with NOV
    2. Open the User Interface > Appearance > Theme Builder example that comes with NOV and click the Open NOV Theme Builder button of the example.
    3. Use the following piece of code in any NOV application:
    Show the NOV Theme Builder programmatically
    Copy Code
    // Create a Theme Builder widget
    NThemeBuilderWidget themeBuilderWidget = new NThemeBuilderWidget();
    
    // Create and open a top level window with the Theme Builder widget
    NTopLevelWindow window = NApplication.CreateTopLevelWindow();
    window.StartPosition = ENWindowStartPosition.CenterScreen;
    window.PreferredSize = new NSize(1000, 700);
    window.SetupApplicationWindow("NOV Theme Builder");
    window.Modal = true;
    window.Content = themeBuilderWidget;
    
    // Open the window and show the Theme Builder start up dialog
    window.Open();
    themeBuilderWidget.ShowStartUpDialog();
    
     Using the Theme Builder

    In the NOV Theme Builder application, click the New button to create a new theme based on an existing theme and the Open and Save buttons to open and save NOV UI themes.

    To load a theme created with the NOV Theme Builder in your application use any of the following static methods of the NTheme class:

    • FromFile - returns a promise that reads and loads a theme from file.
    • FromResource - loads a theme from resource.
    • FromStream - loads a theme from a stream.

    To apply the loaded theme, call NApplication.ApplyTheme in the entry point of your application.

    To save a theme programmatically use the following methods of the NTheme class:

    • Save(NFile file) - saves the theme to an NFile. Returns a promise that gets fulfilled when the file is saved.
    • Save(Stream stream) - saves the theme to a stream.