Restore the default style

This page applies to WPF and Silverlight 2

You can use the style of a control in Microsoft Expression Blend 2 project to specify triggers (WPF) or states (Silverlight 2) and properties that will be used as defaults by the control to which the style is applied. The properties (such as the background brush color) will affect the control's appearance, and the triggers or states will affect how the control responds to property changes and events. For example, when the user moves their mouse over a control, the IsMouseOver property changes from False to True and the MouseOver event fires. You can create a style for a button that causes the background color of the button to change when the mouse pointer moves over the button.

At any time, you can restore the default style or template of a control that is drawn on the artboard. The default style uses a dynamic theme that changes the appearance of your control depending on whether your application runs on a Microsoft Windows XP computer or on a Windows Vista computer. For more information, see the "Themes and simple styles" section of the Style and template overview.

Tip

To restore the default style for a control, you must have applied a different style to it previously. Restoring the default style essentially breaks the link the control had to a style resource.

To restore the default style or template that is applied to an object

  1. On the artboard or under Objects and Timeline, click an object that has a style resource applied to it.

  2. In the Properties panel, locate the Style or Template property, click the property value or the Advanced property options Cc295089.d6ba8f4a-b8a2-445a-af0b-a267dfade6e1(en-us,Expression.10).png marker, and then click Reset on the shortcut menu. Notice that the green outline disappears from around the property value.

See also

Concepts

Apply a style resource