IXRControl::GoToVisualState (Compact 2013)
This method transitions the control between two states.
virtual HRESULT STDMETHODCALLTYPE GoToVisualState( const WCHAR *pStateName, bool UseTransitions ) = 0;
[in] Pointer to a string that indicates the state to transition to. For example:
[in] Value that indicates whether to use visual transitions that are defined in the control to transition between states. This value is true if visual transitions will be used; otherwise it is false.
Returns an HRESULT that indicates success or failure.
This method performs the logic necessary to appropriately start and stop the storyboards that are associated with a transition. When a control calls GoToVisualState to changes its state, the Visual State Manager does one of the following:
- If the IXRVisualState object for the state to which the control is transitioning has an IXRStoryboard object, that storyboard begins. Then, if the IXRVisualState object for the state from which the control has transitioned from has an IXRStoryboard object, that storyboard ends.
- If the control is already in the state specified in pStateName, this method takes no action.
- If the state specified in pStateName does not exist in the control template of this control, this method takes no action.
.NET Framework Equivalent