Theme Renderer

Overview
When a behavior control is added to an EZ-Builder workspace by a user, the control form UI will be manipulated to provide a standard look and feel. Research has demonstrated the benefits of providing users with an unified graphical experience that promotes creativity within EZ-Builder. This is done by relieving cognitive load of the user by giving them less to think about during their robot programming sessions.

Some Theme Examples
Users configure theme colors for their EZ-Builder instance on a per user basis. This configuration is stored in the current logged-in user's registry. The color theme can be customized in the top EZ-Builder menu Options -> Preferences -> Window Theme.

User-inserted image


User-inserted image


User-inserted image



When Is A Control Form Themed?
The theme engine is called against forms when they're added to the project automatically by the ARC workspace manager. This is the same manager that allows changing desktops, smart arranging windows, loading configurations, etc.. As far as when the theme renderer is called in code, it's after the form's constructor and before the OnLoad() event.

Code:

YourPlugin.Constructor()
|
V
Theme Renderer
|
V
YourPlugin.OnLoad()

Skip Themeing of Controls
There's two ways to have a control skip the theme process. This means the specified controls, and respective child controls will be skipped when the theme is applied. 

1) ThemeRenderer - The FormPluginMaster is the base form that your plugin must inherit. Within this FormPluginMaster is a ThemeRenderer object. You can access the ThemeRenderer.ControlsToSkipTheming in the plugin form's constructor following InitializeComponent()  For example, if you had a btnSave that wished to not be themed...

Code:

public MyPlugin() {

// Define and initialize components on plugin form
InitializeComponent();

// Skip the following components from the theme renderer on form
ThemeRenderer.ControlsToSkipTheming.Add(btnSave);
}
2) Tag: SkipTheme - In the properties of a control on your plugin form, you can specify SkipTheme as the Tag value. This will instruct the ThemeRenderer to skip the control and all child controls.
User-inserted image