Content Index Search


The check box is a content control that acts as a toggle that can have three states: checked, unchecked, and indeterminate. The IsChecked state indicates whether the check box is selected. You can place content in a check box in Microsoft® Expression Blend™ by double-clicking the check box and then drawing an element into it. If you want to place multiple elements into the check box, you need to first add in a layout panel such as a Grid or Canvas. A check box also can display text by default; you can edit the text by right-clicking the check box, and then clicking Edit Text.

Artboard view: SimpleCheckBox

The artboard view of a SimpleCheckBox control.

Breaking down the control template

The SimpleCheckBox control template consists of the following items:

Objects view: The basic parts (template) of SimpleCheckBox

Objects view: The basic parts (template) of a SimpleCheckBox 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 SimpleCheckBox template, when the IsChecked property is False, the visibility of the CheckMark path element is changed to Collapsed. In other triggers, you change the background of the Border element by using brush resources.

Brushes used

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

Best practices and design guidelines

Try it!