VisualStateManager.RaiseCurrentStateChanged Metodo

Definizione

Genera l'evento CurrentStateChanging sull'oggetto specificato VisualStateGroup .

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)

Parametri

stateGroup
VisualStateGroup

Oggetto su cui si è verificato l'evento CurrentStateChanging .

oldState
VisualState

Stato da cui viene eseguita la transizione del controllo.

newState
VisualState

Stato in cui viene eseguita la transizione del controllo.

control
FrameworkElement

Controllo che esegue la transizione degli stati.

stateGroupsRoot
FrameworkElement

Elemento radice che contiene l'oggetto VisualStateManager.

Eccezioni

stateGroupsRoot è null.

oppure

newState è null.

Commenti

Quando l'oggetto VisualStateGroupControlTemplate è impostato su di un controllo , il control parametro viene impostato sul controllo proprietario ControlTemplatedi . Quando l'oggetto VisualStateGroup è impostato su , FrameworkElementcontrol è null ed è necessario usare il stateGroupsRoot parametro .

Note per gli eredi

Quando si esegue l'override RaiseCurrentStateChanged(VisualStateGroup, VisualState, VisualState, FrameworkElement, FrameworkElement) in una classe derivata, assicurarsi di chiamare il metodo della RaiseCurrentStateChanged(VisualStateGroup, VisualState, VisualState, FrameworkElement, FrameworkElement) classe base in modo che i delegati registrati ricevano l'evento.

Si applica a