You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This page explains the use of Themes in the platform.



Introduction

  • With our new theme selector, users can easily pick a theme that best suit their environment or visual preferences.

  • Easily build your own theme or use one of our prebuilt themes.
  • Is there any item or even an entire screen you do not want to have default theme? A simple checkbox allows you to change it.



Overview


The Themes function allows you to customize the appearance of your display to better suit your Project. It is available for .NET and HTML5 Clients.

When you go to Run → Dictionaries → Themes, you will find predefined theme palettes that are built into most of the project templates. The Blank Project 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 projects. 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 Draw Editor 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. 

Enable Themes option location

  

Individual components will have an Enable/Disable checkbox in the left panel settings.

Enable Theme option location for individual components



How to Set a Theme

There are a couple of different ways in which a theme can be applied to an object or project:

  • Startup a Theme in a Project.
  • 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 project.

To do so, go to Edit → Displays → List, and click .NET Clients button at Client Settings. It will open a popup window where the Initial Theme field is on the bottom. See the image below.

If the field is left blank, the project starts up without any theme using the objects properties used at the moment the displays were created.


Client Window Settings options

Change 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 project 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.

@Client.Theme = "Blue";
@Client.Theme = "Dark";
@Client.Theme = "Yellow";
@Client.Theme = "";

Configure 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 Run → Dictionaries → 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. 



List of 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 or

1 – 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


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 project 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. 


Here you can create your own color palette for your project



Creating new Themes

On Run → Dictionaries → 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:

Buttons available on the Themes tab

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.

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.

Example of objects using Uid field



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 project.

Advanced Properties

On Run → Dictionaries → Themes and 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.

* 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 Project

There is a Theme demo project available so the customer can test this feature. It contains all supported elements and shows how to use this feature in a project.

There are several different themes available in this demo project that you can use as reference to build it in your own project. Copy from Theme tables (Run → Dictionaries → Themes) and paste in your own paste <<<<.does it mean "folder"?>>>> also work great. See below some images extracted from the project.




In this section...

The root page @parent could not be found in space v10.

  • No labels