VisualStateManager.RaiseCurrentStateChanging Metoda

Definice

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

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)

Parametry

stateGroup
VisualStateGroup

Objekt, u kterého CurrentStateChanging došlo k události.

oldState
VisualState

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

newState
VisualState

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

control
FrameworkElement

Ovládací prvek, který provádí přechod stavů.

stateGroupsRoot
FrameworkElement

Kořenový element, který obsahuje VisualStateManager.

Výjimky

stateGroupsRoot je null.

-nebo-

newState je null.

Poznámky

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

Poznámky pro dědice

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

Platí pro