// Token: 0x06000CF1 RID: 3313 RVA: 0x0002FF14 File Offset: 0x0002E114 private static bool GoToStateCommon(FrameworkElement control, FrameworkElement stateGroupsRoot, string stateName, bool useTransitions) { if (stateName == null) { throw new ArgumentNullException("stateName"); } if (stateGroupsRoot == null) { return(false); } IList <VisualStateGroup> visualStateGroupsInternal = VisualStateManager.GetVisualStateGroupsInternal(stateGroupsRoot); if (visualStateGroupsInternal == null) { return(false); } VisualStateGroup group; VisualState visualState; VisualStateManager.TryGetState(visualStateGroupsInternal, stateName, out group, out visualState); VisualStateManager customVisualStateManager = VisualStateManager.GetCustomVisualStateManager(stateGroupsRoot); if (customVisualStateManager != null) { return(customVisualStateManager.GoToStateCore(control, stateGroupsRoot, stateName, group, visualState, useTransitions)); } return(visualState != null && VisualStateManager.GoToStateInternal(control, stateGroupsRoot, group, visualState, useTransitions)); }
/// <summary>Transitions a control between states.</summary> /// <param name="control">The control to transition between states. </param> /// <param name="stateGroupsRoot">The root element that contains the <see cref="T:System.Windows.VisualStateManager" />.</param> /// <param name="stateName">The name of the state to transition to.</param> /// <param name="group">The <see cref="T:System.Windows.VisualStateGroup" /> that the state belongs to.</param> /// <param name="state">The representation of the state to transition to.</param> /// <param name="useTransitions"> /// <see langword="true" /> to use a <see cref="T:System.Windows.VisualTransition" /> object to transition between states; otherwise, <see langword="false" />.</param> /// <returns> /// <see langword="true" /> if the control successfully transitioned to the new state; otherwise, <see langword="false" />.</returns> // Token: 0x06000CF4 RID: 3316 RVA: 0x0002FFB8 File Offset: 0x0002E1B8 protected virtual bool GoToStateCore(FrameworkElement control, FrameworkElement stateGroupsRoot, string stateName, VisualStateGroup group, VisualState state, bool useTransitions) { return(VisualStateManager.GoToStateInternal(control, stateGroupsRoot, group, state, useTransitions)); }