VisualStateManager.RaiseCurrentStateChanged Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Raises the CurrentStateChanging event on the specified VisualStateGroup object.
protected:
void RaiseCurrentStateChanged(System::Windows::VisualStateGroup ^ stateGroup, System::Windows::VisualState ^ oldState, System::Windows::VisualState ^ newState, System::Windows::FrameworkElement ^ control, System::Windows::FrameworkElement ^ stateGroupsRoot);
protected void RaiseCurrentStateChanged (System.Windows.VisualStateGroup stateGroup, System.Windows.VisualState oldState, System.Windows.VisualState newState, System.Windows.FrameworkElement control, System.Windows.FrameworkElement stateGroupsRoot);
member this.RaiseCurrentStateChanged : System.Windows.VisualStateGroup * System.Windows.VisualState * System.Windows.VisualState * System.Windows.FrameworkElement * System.Windows.FrameworkElement -> unit
Protected Sub RaiseCurrentStateChanged (stateGroup As VisualStateGroup, oldState As VisualState, newState As VisualState, control As FrameworkElement, stateGroupsRoot As FrameworkElement)
Parameters
- stateGroup
- VisualStateGroup
The object that the CurrentStateChanging event occurred on.
- oldState
- VisualState
The state that the control is transitioning from.
- newState
- VisualState
The state that the control is transitioning to.
- control
- FrameworkElement
The control that is transitioning states.
- stateGroupsRoot
- FrameworkElement
The root element that contains the VisualStateManager.
Exceptions
Remarks
When the VisualStateGroup is set on the ControlTemplate of a control, the control
parameter is set to the control that owns ControlTemplate. When the VisualStateGroup is set on a FrameworkElement, control
is null
and you should use the stateGroupsRoot
parameter.
Notes to Inheritors
When overriding RaiseCurrentStateChanged(VisualStateGroup, VisualState, VisualState, FrameworkElement, FrameworkElement) in a derived class, be sure to call the base class' RaiseCurrentStateChanged(VisualStateGroup, VisualState, VisualState, FrameworkElement, FrameworkElement) method so that registered delegates receive the event.