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.
When overridden in a derived class, fires the CurrentStateChanged event on the specified VisualStateGroup.
protected:
virtual void RaiseCurrentStateChanged(VisualStateGroup ^ stateGroup, VisualState ^ oldState, VisualState ^ newState, Control ^ control) = RaiseCurrentStateChanged;
void RaiseCurrentStateChanged(VisualStateGroup const& stateGroup, VisualState const& oldState, VisualState const& newState, Control const& control);
protected void RaiseCurrentStateChanged(VisualStateGroup stateGroup, VisualState oldState, VisualState newState, Control control);
function raiseCurrentStateChanged(stateGroup, oldState, newState, control)
Protected Sub RaiseCurrentStateChanged (stateGroup As VisualStateGroup, oldState As VisualState, newState As VisualState, control As Control)
Parameters
- stateGroup
- VisualStateGroup
The object on which the CurrentStateChanging event occurred.
- oldState
- VisualState
The state that the control transitions from.
- newState
- VisualState
The state that the control transitions to.
- control
- Control
The control that transitioned states.
Remarks
This API is part of the scenario of defining a custom VisualStateManager behavior. The most important method to override in this scenario is GoToStateCore, because it's that method that changes the state behavior in your custom class behavior. Overriding the behavior of RaiseCurrentStateChanged
and RaiseCurrentStateChanging is optional: how and when the events are raised by the default implementation might be adequate for your custom class.