Skip to content

Update Expression Blend reference #4090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xml/System.Windows/VisualStateGroup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

You add <xref:System.Windows.VisualState> to a control by setting the `VisualStateManager.VisualStateGroups` attached property on the control. You put states that are mutually exclusive to each other in the same <xref:System.Windows.VisualStateGroup>. For example, the <xref:System.Windows.Controls.CheckBox> has two <xref:System.Windows.VisualStateGroup> objects. One contains the states, `Normal`, `MouseOver`, `Pressed`, and `Disabled`. The other contains the states, `Checked`, `UnChecked`, and `Indeterminate`. The <xref:System.Windows.Controls.CheckBox> can be in states `MouseOver` and `UnChecked` at the same time, but it cannot be in the `MouseOver` and `Pressed` states at the same time.

Although you can add <xref:System.Windows.VisualState> objects to any element, they are a particularly useful way to enable others to redefine the visual behavior of a <xref:System.Windows.Controls.Control>. If you create a custom control that uses a <xref:System.Windows.Controls.ControlTemplate>, you can specify which states that control can be in by adding a <xref:System.Windows.TemplateVisualStateAttribute> on its class definition. Then anyone who creates a new <xref:System.Windows.Controls.ControlTemplate> for your control can add <xref:System.Windows.VisualState> objects to the template. The <xref:System.Windows.TemplateVisualStateAttribute> enables designer tools, such as Expression Blend, to expose the control's states. States with the same <xref:System.Windows.TemplateVisualStateAttribute.GroupName%2A?displayProperty=nameWithType> belong in the same <xref:System.Windows.VisualStateGroup>.
Although you can add <xref:System.Windows.VisualState> objects to any element, they are a particularly useful way to enable others to redefine the visual behavior of a <xref:System.Windows.Controls.Control>. If you create a custom control that uses a <xref:System.Windows.Controls.ControlTemplate>, you can specify which states that control can be in by adding a <xref:System.Windows.TemplateVisualStateAttribute> on its class definition. Then anyone who creates a new <xref:System.Windows.Controls.ControlTemplate> for your control can add <xref:System.Windows.VisualState> objects to the template. The <xref:System.Windows.TemplateVisualStateAttribute> enables designer tools, such as Visual Studio and Blend for Visual Studio, to expose the control's states. States with the same <xref:System.Windows.TemplateVisualStateAttribute.GroupName%2A?displayProperty=nameWithType> belong in the same <xref:System.Windows.VisualStateGroup>.

For more information about how to use <xref:System.Windows.VisualStateGroup> objects in a <xref:System.Windows.Controls.ControlTemplate>, see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). For more information about how to create controls that use the <xref:System.Windows.VisualStateManager>, see [Creating a Control That Has a Customizable Appearance](~/docs/framework/wpf/controls/creating-a-control-that-has-a-customizable-appearance.md).

Expand Down