VisualStateManager.RaiseCurrentStateChanging Método

Definición

Genera el evento CurrentStateChanging en el objeto VisualStateGroup especificado.

protected:
 void RaiseCurrentStateChanging(System::Windows::VisualStateGroup ^ stateGroup, System::Windows::VisualState ^ oldState, System::Windows::VisualState ^ newState, System::Windows::FrameworkElement ^ control, System::Windows::FrameworkElement ^ stateGroupsRoot);
protected void RaiseCurrentStateChanging (System.Windows.VisualStateGroup stateGroup, System.Windows.VisualState oldState, System.Windows.VisualState newState, System.Windows.FrameworkElement control, System.Windows.FrameworkElement stateGroupsRoot);
member this.RaiseCurrentStateChanging : System.Windows.VisualStateGroup * System.Windows.VisualState * System.Windows.VisualState * System.Windows.FrameworkElement * System.Windows.FrameworkElement -> unit
Protected Sub RaiseCurrentStateChanging (stateGroup As VisualStateGroup, oldState As VisualState, newState As VisualState, control As FrameworkElement, stateGroupsRoot As FrameworkElement)

Parámetros

stateGroup
VisualStateGroup

Objeto en el que se produjo el evento CurrentStateChanging.

oldState
VisualState

Estado del que el control está realizando la transición.

newState
VisualState

Estado al que el control está realizando la transición.

control
FrameworkElement

Control que está realizando la transición entre estados.

stateGroupsRoot
FrameworkElement

Elemento raíz que contiene VisualStateManager.

Excepciones

stateGroupsRoot es null.

o bien

newState es null.

Comentarios

VisualStateGroup Cuando se establece en de ControlTemplate un control , el control parámetro se establece en el control propietario ControlTemplatede . VisualStateGroup Cuando se establece en , FrameworkElementcontrol es null y debe usar el stateGroupsRoot parámetro .

Notas a los desarrolladores de herederos

Al invalidar RaiseCurrentStateChanging(VisualStateGroup, VisualState, VisualState, FrameworkElement, FrameworkElement) en una clase derivada, asegúrese de llamar al método de RaiseCurrentStateChanging(VisualStateGroup, VisualState, VisualState, FrameworkElement, FrameworkElement) la clase base para que los delegados registrados reciban el evento.

Se aplica a