VisualStateManager.RaiseCurrentStateChanging Metoda

Definicja

CurrentStateChanging Zgłasza zdarzenie w określonym VisualStateGroup obiekcie.

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

Obiekt, CurrentStateChanging na który wystąpiło zdarzenie.

oldState
VisualState

Stan, z którego przechodzi kontrolka.

newState
VisualState

Stan, do którego przechodzi kontrolka.

control
FrameworkElement

Kontrolka, która przechodzi stany.

stateGroupsRoot
FrameworkElement

Element główny zawierający VisualStateManagerelement .

Wyjątki

stateGroupsRoot to null.

-lub-

newState to null.

Uwagi

VisualStateGroup Gdy parametr jest ustawiony na ControlTemplate kontrolce, control parametr jest ustawiony na kontrolkę, która jest właścicielem ControlTemplate. Gdy parametr VisualStateGroup jest ustawiony na obiekcie FrameworkElement, control jest null i należy użyć parametru stateGroupsRoot .

Uwagi dotyczące dziedziczenia

Podczas zastępowania RaiseCurrentStateChanging(VisualStateGroup, VisualState, VisualState, FrameworkElement, FrameworkElement) w klasie pochodnej należy wywołać metodę klasy RaiseCurrentStateChanging(VisualStateGroup, VisualState, VisualState, FrameworkElement, FrameworkElement) bazowej, aby zarejestrowani delegaci otrzymywali zdarzenie.

Dotyczy