VisualStateManager.RaiseCurrentStateChanged Metoda

Definice

CurrentStateChanging Vyvolá událost u zadaného VisualStateGroup objektu.

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)

Parametry

stateGroup
VisualStateGroup

Objekt, na který došlo k CurrentStateChanging události.

oldState
VisualState

Stav, ze kterého ovládací prvek přechází.

newState
VisualState

Stav, na který ovládací prvek přechází.

control
FrameworkElement

Ovládací prvek, který přechází stavy.

stateGroupsRoot
FrameworkElement

Kořenový prvek, který obsahuje VisualStateManager.

Výjimky

stateGroupsRoot je null.

nebo

newState je null.

Poznámky

VisualStateGroup Pokud je nastaven na ControlTemplate ovládací prvek, control je parametr nastaven na ovládací prvek, který vlastní ControlTemplate. Pokud je nastavena na VisualStateGroup parametr , FrameworkElementcontrolje null a měli byste použít stateGroupsRoot parametr.

Poznámky pro dědice

Při přepsání RaiseCurrentStateChanged(VisualStateGroup, VisualState, VisualState, FrameworkElement, FrameworkElement) v odvozené třídě nezapomeňte volat metodu základní třídy RaiseCurrentStateChanged(VisualStateGroup, VisualState, VisualState, FrameworkElement, FrameworkElement) , aby zaregistrovaní delegáti obdrželi událost.

Platí pro