Freigeben über


Restore the default style

You can use the style of a control in Blend for Visual Studio 2012 project to specify triggers (Windows Presentation Foundation (WPF)) or states (Microsoft Silverlight) 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. For more information, see Create a style and Styling tips for WPF Simple Styles.

TippTipp

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 in the Objects and Timeline panel, 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 click Advanced options JJ170477.12e06962-5d8a-480d-a837-e06b84c545bb(de-de,VS.110).png, and then click Reset on the shortcut menu. Notice that the green outline disappears from around the property value.

Siehe auch

Aufgaben

Apply a style resource