VisualStateGroup.Transitions Property

Gets the collection of VisualTransition objects.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

public IList Transitions { get; }

XAML Values


One or more object elements that is of type VisualTransition.

Property Value

Type: System.Collections.IList
The collection of VisualTransition objects.

The VisualTransition objects in Transitions are applied when the control transition between states that are defined in the VisualStateGroup.

The following example creates a simple ControlTemplate for a Button that contains one Grid. It also contains a VisualStateGroup called CommonStates, which defines the MouseOver and Normal states. The VisualStateGroup also has a VisualTransition that specifies that it takes one half second for the Grid to change from green to red when the user puts the mouse over the Button.

Run this sample

<ControlTemplate TargetType="Button">
  <Grid >
      <VisualStateGroup x:Name="CommonStates">


          <!--Take one half second to trasition to the MouseOver state.-->
          <VisualTransition To="MouseOver" 

        <VisualState x:Name="Normal" />

        <!--Change the SolidColorBrush, ButtonBrush, to red when the
            mouse is over the button.-->
        <VisualState x:Name="MouseOver">
            <ColorAnimation Storyboard.TargetName="ButtonBrush" 
                            Storyboard.TargetProperty="Color" To="Red" />
      <SolidColorBrush x:Name="ButtonBrush" Color="Green"/>


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions