Symphony Framework
QuitStateCommand Constructor
Example 
Symphony.Conductor.Commands Namespace > QuitStateCommand Class : QuitStateCommand Constructor
The QuitStateCommand extends the base RoutedCommandBase class to define a bind-able command which when executed will pop the current visual state from the visual state stack.
Syntax
public QuitStateCommand( 
   BaseViewModel viewModel
)

Parameters

viewModel
Remarks
Visual States are defined in XAML and allow you to control the visual requirements of your applcaiiton. For example you may want to display a look list and requrie the backgound input form to be disabled. Using a visual state you can define which controls are enabled or visible and which are not. Visual states work on a "stack" basis meaning as you navigate to a visual state you will pop the current visual state onto the visual stack. Exiting from a visual state pops off the current visual state off the visual stack and return the User Interface to the previous visual state. Use the QuitStateCommand to pop a visual state from the visual state stack. When navigating visual states there are a number of events that occur. Please see the Symphony.Conductor.Framework.UIStateStack class for more details.
Example
private NavigateStateCommand mNavigateVisualState;

public NavigateStateCommand NavigateVisualState
{
    get
    {
        return mNavigateVisualState == null ? mNavigateVisualState = new NavigateStateCommand(this) : mNavigateVisualState;
    }
}
private QuitStateCommand mQuitVisualState;

public QuitStateCommand QuitVisualState
{
    get
    {
        return mQuitVisualState == null ? mQuitVisualState = new QuitStateCommand(this) : mQuitVisualState;
    }
}
<VisualStateManager.VisualStateGroups>
    <VisualStateGroup x:Name="applicationStates">

        <VisualState x:Name="BaseViewState">
            <Storyboard>
                <DoubleAnimation Storyboard.TargetName="messageView" Storyboard.TargetProperty="(Opacity)" Duration="0:0:0" To="0" />
                <BooleanAnimationUsingKeyFrames Storyboard.TargetName="messageView" Storyboard.TargetProperty="(IsEnabled)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="False"></DiscreteBooleanKeyFrame>
                </BooleanAnimationUsingKeyFrames>
                <Int32Animation Storyboard.TargetName="messageView" Storyboard.TargetProperty="(Panel.ZIndex)" To="0" />

                <DoubleAnimation Storyboard.TargetName="baseView" Storyboard.TargetProperty="(Opacity)" Duration="0:0:0" To="1" />
                <BooleanAnimationUsingKeyFrames Storyboard.TargetName="baseView" Storyboard.TargetProperty="(IsEnabled)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="True"></DiscreteBooleanKeyFrame>
                </BooleanAnimationUsingKeyFrames>
                <Int32Animation Storyboard.TargetName="baseView" Storyboard.TargetProperty="(Panel.ZIndex)" To="1" />


            </Storyboard>
        </VisualState>

        <VisualState x:Name="MessageViewState">
            <Storyboard>

                <DoubleAnimation Storyboard.TargetName="baseView" Storyboard.TargetProperty="(Opacity)" Duration="0:0:0" To="0" />
                <BooleanAnimationUsingKeyFrames Storyboard.TargetName="baseView" Storyboard.TargetProperty="(IsEnabled)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="False"></DiscreteBooleanKeyFrame>
                </BooleanAnimationUsingKeyFrames>
                <Int32Animation Storyboard.TargetName="baseView" Storyboard.TargetProperty="(Panel.ZIndex)" To="0" />

                <DoubleAnimation Storyboard.TargetName="messageView" Storyboard.TargetProperty="(Opacity)" Duration="0:0:0" To="1" />
                <BooleanAnimationUsingKeyFrames Storyboard.TargetName="messageView" Storyboard.TargetProperty="(IsEnabled)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="True"></DiscreteBooleanKeyFrame>
                </BooleanAnimationUsingKeyFrames>
                <Int32Animation Storyboard.TargetName="messageView" Storyboard.TargetProperty="(Panel.ZIndex)" To="1" />

            </Storyboard>
        </VisualState>
    </VisualStateGroup>
</VisualStateManager.VisualStateGroups>
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

QuitStateCommand Class
QuitStateCommand Members