Share via


VisualStateManager.RaiseCurrentStateChanging Method

Definition

When overridden in a derived class, fires the CurrentStateChanging event on the specified VisualStateGroup.

protected:
 virtual void RaiseCurrentStateChanging(VisualStateGroup ^ stateGroup, VisualState ^ oldState, VisualState ^ newState, Control ^ control) = RaiseCurrentStateChanging;
void RaiseCurrentStateChanging(VisualStateGroup const& stateGroup, VisualState const& oldState, VisualState const& newState, Control const& control);
protected void RaiseCurrentStateChanging(VisualStateGroup stateGroup, VisualState oldState, VisualState newState, Control control);
function raiseCurrentStateChanging(stateGroup, oldState, newState, control)
Protected Sub RaiseCurrentStateChanging (stateGroup As VisualStateGroup, oldState As VisualState, newState As VisualState, control As Control)

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 should transition to.

control
Control

The control where the transition animation between states is applied.

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.

Applies to