Version

Converting a State into a Resource

When styling a UI Role, you will most likely create a style that you want to apply to other UI Roles. Rather than recreating the style on several different states, you can convert the style into a Resource, which can then be applied to any other state of any UI Role.

To convert a state into a Resource:

  1. Select any state of any UI Role.

  2. Style the state to suit your application’s needs.

  3. Click Convert to Resource.

Shows the location of the Convert to Resource button in the Resources panel.

A dialog box will display requesting a name for the Resource. The default name given to the Resource will always be StyleSet_UIRole_State . In this example, the StyleSet is GridStyle, the UI Role is Cell, and the State being styled is HotTracked. You are also given the option to reset the state’s appearance properties and apply the Resource instead.

The Create a Resource from a State dialog.
  1. Once finished renaming the style, click OK. The new Resource is added to the state and the appearance properties are reset.

Shows the Resources panel with the newly named resource.