Content Index Search
 

SimpleButton

The button is a content control, which reacts to a Click event. You can place content in a button in Microsoft® Expression Blend™ by double-clicking the button and then drawing an element into it. If you want to place multiple elements into the button, you need to first add in a layout panel such as a Grid or Canvas. A button also can display text by default; you can edit the text by right-clicking the button, and then clicking Edit Text.

Artboard view: SimpleButton

The artboard view of a SimpleButton control.

Breaking down the control template

The SimpleButton control template consists of the following items:

Objects view: The basic parts (template) of SimpleButton

Objects view: The basic parts (template) of a SimpleButton control.

Property triggers used

Property triggers in the control template are used to make the control react to property changes. You can click the items under Triggers in the Interaction panel to view the properties that are changed when a trigger is active. For example, in the SimpleButton template, when the IsMouseOver property becomes True, the background of the Border element changes color to the MouseOverBrush resource.

Brushes used

The following brush resources in the SimpleStyles.xaml resource dictionary are used by the SimpleButton template:

Best practices and design guidelines

Try it!