VisualStateManager.RaiseCurrentStateChanged Metoda

Definicja

CurrentStateChanging Wywołuje zdarzenie dla określonego VisualStateGroup obiektu.

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

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

oldState
VisualState

Stan, z którego następuje przejście kontrolki.

newState
VisualState

Stan, do którego przechodzi kontrolka.

control
FrameworkElement

Kontrolka, która przechodzi stany.

stateGroupsRoot
FrameworkElement

Element główny zawierający element VisualStateManager.

Wyjątki

stateGroupsRoot to null.

-lub-

newState to null.

Uwagi

Gdy właściwość VisualStateGroup jest ustawiona na kontrolce ControlTemplate , control parametr jest ustawiany na kontrolkę będącą właścicielem ControlTemplate. Jeśli parametr VisualStateGroup jest ustawiony na FrameworkElementobiekcie , control to null , a należy użyć parametru stateGroupsRoot .

Uwagi dotyczące dziedziczenia

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

Dotyczy