예제 #1
0
        // 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));
        }