public NavigateStateCommand( BaseViewModel viewModel )
Parameters
- viewModel
- Inject the View Model.
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>
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