Overview
Themes are a configuration feature designed to set colors in display objects in runtime and the Designer Workspace. Their purpose is to maintain visual consistency and usability. Main functionalities include defining general colors, backgrounds, text elements, dashboard elements, interaction states, disabled controls, high-performance graphics, and alarm colors. Apply themes to interfaces for clear visual hierarchies and state indicators. Before usage, identify the palette and rename objects per the naming convention. Use the customized themes to ensure consistent visual presentation and usability across different environments.
On this page:
Table of Contents | ||||
---|---|---|---|---|
|
Understanding Themes
, and optional on Runtime displays.
Themes are sets of visual styles determining the appearance of pages and objects within an application, including colors and design elements. Their purpose is to standardize and customize the application's visual appearance, ensuring consistency across components. Themes function as collections of design parameters controlling color schemes and layout aesthetics.
On this page:
Table of Contents | ||||
---|---|---|---|---|
|
Applying Themes
On the Designer (engineering workspace) go to Home, and select the Theme at that Welcome page
On the Designer Drawing tool, at the Properties SIdeBar, there is a RuntimeTheme ComboBox, which allows the drawing editor to emulate the runtime theme, only in drawing area.
When drawing displays, selecting styles via the Brush Editor.
When running the solution, change dynamically the Theme using the property @Client.Theme
Working with Themes
Configuring Themes
The Themes function allows you to customize the appearance of your display to better suit your solution. It is available for .NET and HTML5 Clients.
When you go to Displays / Themes, you will find predefined theme palettes that are built into most of the solution templates. The Blank Solution is the only theme that does not have predefined theme palettes. Themes are completely customizable since you can select any color you want for each element in each column. You can use this method to create your own theme.
The colors and themes displayed in the image below are built into new solutions. The Dashboard, HighPerformance and Standard display elements are grouped together in the ItemName column.
Enabling/Disabling Theme
To enable or disable the themes function, go to the Display / Draw and click the checkbox located at the bottom of the left panel.
When a theme is disabled for an entire page, the theme for every object in the display will also be disabled. The colors will be the predefined colors shown in the image above.
When you change the theme in runtime, the pages and objects will keep their default configured colors.
Individual components will have an Enable/Disable checkbox in the left panel settings.
Working with a Theme
There are a couple of different ways in which a theme can be applied to an object or solution:
Startup a Theme in a solution.
Change a Theme in Runtime.
Configure a Palette for an Element in a Page (Rectangle, Button, Textblock, etc).
Pre-defined Theme and Colors.
Specific Element Properties (Advanced Settings).
Selecting a Startup Theme
You can select a pre-created Theme to startup your solution.
To do so, go to Displays / List, and click Windows button at Client Settings. It will open a popup window where the Initial Theme field is on the bottom. See the image below.
Note |
---|
If the field is left blank, the solution starts up without any theme using the objects properties used at the moment the displays were created. |
Changing a Theme in Runtime
Theme selection in runtime can be done by using the syntax below in Script codes, Expression fields, or objects configuration.
To set the solution to the default configuration, without a custom theme, you need to set the Client.Theme
to an empty string (Client.Theme= ””)
or create an empty theme table and assign it to the theme property.
Code Block |
---|
@Client.Theme = "Blue"; @Client.Theme = "Dark"; @Client.Theme = "Yellow"; @Client.Theme = ""; |
Configuring a Palette for an Element
Configure a Palette for an Element in a Page (Rectangle, Button, Textblock, etc).
To set a theme for an element in the display, you need to open the Appearance configuration window located in the left panel toolbar, in Displays / Themes.
At the top of the Appearance configuration window, you will find a field called Theme Color. To select the color you want, you can insert the item name or click the button and browse through the available ones.
For the most part, this theme color configuration window will be available for all elements that can have their colors changed.
Pre-defined Theme Colors
Go To Displays → Themes, in order to view the various Themes dents and its color pallet.
A Theme Pallet incudes standard color for visual elements like
Supported Components
The list below presents display objects that you are able to customize in the Theme tab and some of the most used properties:
Type Name
Type Property
Example
Description
TButton
Background
#FF434343
Background color
Foreground
WhiteSmoke
Text Label color
Font Family
Courier New
Font Families
FontStyle
Italic
Font Styles
TLabelBox
Background
Transparent
Background color
Foreground
Black
Text Label color
TDisplay
Background
LightGray
Background color
TLayout
Background
#968B7D
Background color
Rectangle
Fill
#C8BDAF
Fill color
Stroke
#322719
Border line color
Ellipse
Fill
WhiteSmoke
Fill color
Stroke
#9D7C8D
Border Line color
Polygon
Fill
#C3C3AA
Fill color
Stroke
#51504E
Border line color
Polyline
Stroke
#51504E
Border line color
Path
Fill
#EBEBD2
Fill color
Stroke
Blue
Border line color
TTextBox
Background
#DD97A6
Background color
Foreground
Black
Text color
TComboBox
Background
#DD97A6
Background color
Foreground
Black
Text color
TListBox
Background
#DD97A6
Background color
Foreground
Black
Text color
TCheckBox
Background
#7AE3DB
Background color
Foreground
Black
Text color
BorderBrush
Black
Border line color of CheckBox
OptionMark.Fill
#87353A
Color of check mark
TRadioButton
Background
#7AE3DB
Background color
Foreground
Black
Text color
BorderBrush
Black
Border line color of RadioBox
OptionMark.Fill
#87353A
Color of check mark
TSlider
grip.Fill
Black
Fill color
TrackBackground.Background
Black
Background color
TMenuItem
Background
LightGray
Background color
Foreground
WhiteSmoke
Text color
TTitleBar
Background
LightGray
Background color
Label DragBarTitle.Foreground
Black
Text color
TDrillingChart
CursorBrush
Blue
Vertical cursor color
LabelsBrush
Black
Text Label color
GridLinesBrush
#B6B6B4
Grid Lines color
WindowsBrush
WhiteSmoke
Background color
TTrendChart
LegendColorOption
1
Background Legend color (0 –White or1 – Transparent)
LabelsBrush
#51504E
Text Label color
GridLinesBrush
#51504E
Grid Lines color
CursorBrush
Blue
Vertical cursor color
WindowsBrush
#C3C3AA
Background color
TAlarmWindow
Theme
MetroDark
Custom Theme Style
TDataGridWindow
Theme
MetroDark
Custom Theme Style
TPageSelector
Theme
Zune
Custom Theme Style
Note |
---|
If you add the Rectangle and Ellipse types to the Themes list, you need to remember that some Default Displays (Header, LogOn and About) contains this element. So you might need to disable the Theme for those displays or the specifics objects. |
The Theme property for TAlarmWindow, TDataGridWindow and TPageSelector objects contains your own themes. See below the supported value for it:
MetroDark
MetroLight
ExpressionLight
ExpressionBlack
ExpressionBlue
ExpressionLive
Zune
Windows7
Glass
Windows8
MediaPlayer
Classic
Pre-defined Theme and Colors
When a new solution is created, it already contains several built-in themes and colors. You can create a new theme with new colors, or you can change the color of the pre-configured theme. Some important elements that have pre-defined colors:
DefaultColor
DisplayBackground
HeaderBackground
TextForeGround
All HighPerformance State (all of them start with HP, ex: HPOnStroke, HPOffStroke, HPDisableStroke)
Dashboard pages (all of them start with Dashboard, ex: DashboardTitleBackground, DashboardItem…)
You can use all the colors in the image below to create any color palette you desire.
When you create displays consistent with those standards, when a new Theme is loaded, the visuals of your displays will remain consistent.
Dark and Light Themes
There are 10 pre-defined themes, 5 with Light background and 5 with Dark background
Additionally, there 2 themes for HighContrast, and the option to create 2 more custom themes.
Creating new Themes
On Displays / Themes,you will find all the required information to add different theme options to your components. On the top of the display, you will find some buttons:Theme header
New: Creates a new Themes template option.
Del: Deletes an existing Themes template.
Rename: Renames an existing Themes template.
Check: Checks all added elements to see if there is any invalid configuration.
Export Properties: Exports to the clipboard all properties that are available for selected object type. The user can see them by pasting it to Notepad, for example.
In the grid under these buttons, you will find the following columns:
Type Name: The object type that will be customized (see supported elements in the next Section).
Property Name: Object property that will be customized.
Value: Value that will be applied to the element property. It can be Colors, Font Type, Font Size, Stroke Thickness, etc. For colors you can use in Hex format (e.g.: 0000FF) or HTML Color name (e.g.: Blue).
Description: A briefly description about the component.
Uid: Custom name given to a display object in Draw Environment. UID is optional and it should be used when you want to customize specific objects. The UID is how to identify these objects. You can have many objects with the same UID, so the themes will apply the same property value to all of them. See the image below where you can find the UID field.
In the image below, you can find an example of 3 objects (in the left side) with the same Uid and another one (right side) with different Uid.
Exporting Themes
When selecting to export a page or a symbol with the dependencies enabled the Item Name (rows) will be included in the export process. To include new theme columns the specific ThemeColorName must to be selected manually. It will avoid replace the color scheme already defined in the target solution.
Advanced Properties
On Run / Dictionaries / Themesand under the Advanced settings, you can customize the component properties.When clicking the advanced button from the Theme tab, the advanced dialog box will open based on which theme you selected with the combobox.
It is important to notice that these properties will only be valid for the specific theme displayed in the Configuration Window (1).
By opening the advanced settings, you can easily access components such as text font, radio box marker, combo box marker, or components that are not colors or are not exposed in the drawing tool configuration.
In the example above, the customization is valid to TRadioButtons and all Ellipse. You can overwrite the basic color configuration by opening the Advanced Settings and typing the name of the property and value you desire. To filter for specific elements, you should use the Uid property to select a specific element.
To make sure the configuration you inserted is valid, always click the Check button (2). A popup message will appear with a Success/Error message.
The Export Properties button (3) will export all properties that are available, for the selected object, to the clipboard. The user can see the properties by pasting them to a text editor application (e.g.: Notepad). Below you can find some of the exported properties for the Ellipse object.
Code Block |
---|
* Type: System.Windows.Shapes.Ellipse
- Properties:
. Effect, System.Windows.Media.Effects.Effect
. Fill, System.Windows.Media.Brush
. Focusable, System.Boolean
. Height, System.Double
. UseLayoutRounding, System.Boolean
. VerticalAlignment, System.Windows.VerticalAlignment
. Visibility, System.Windows.Visibility
. Width, System.Double |
Demonstration solution
There is a Theme demo solution available so the customer can test this feature. It contains all supported elements and shows how to use this feature in a solution.
There are several different themes available in this demo solution that you can use as reference to build it in your own solution. Copying from Theme tables (Displays / Themes) and pasting it in your own folder also work great. See below some images extracted from the solution.
In this section:
Page Tree | ||||
---|---|---|---|---|
|