Symphony Framework
Execute Method (NavigateStateCommand)
Example 
Symphony.Conductor.Commands Namespace > NavigateStateCommand Class : Execute Method
The UI control
Execute method performs the command. This method should be overriden to implement logic.
Syntax
public override void Execute( 
   object parameter
)

Parameters

parameter
The UI control
Remarks
The bound User Interface control executes the RoutedCommandBase.Execute() method to perform the logic associated with the command. This method should be overriden by the extending class to allow logic to be executed. By default this method performs no function.
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

NavigateStateCommand Class
NavigateStateCommand Members