UpdateVisualState() private method

Updates the visual state.
private UpdateVisualState ( bool useTransitions ) : void
useTransitions bool /// Indicates whether visual transitions should be used. ///
return void
        /// <summary>
        /// IsNonExpandableProperty changed handler.
        /// </summary>
        /// <param name="obj">The dependency object.</param>
        /// <param name="e">The event information.</param>
        private static void OnIsNonExpandablePropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            ExpanderView source = (ExpanderView)obj;

            if ((bool)e.NewValue)
            {
                if (source.IsExpanded)
                {
                    source.IsExpanded = false;
                }
            }

            source.UpdateVisualState(true);
        }
        /// <summary>
        /// IsExpandedProperty changed handler.
        /// </summary>
        /// <param name="obj">The dependency object.</param>
        /// <param name="e">The event information.</param>
        private static void OnIsExpandedPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            ExpanderView source = (ExpanderView)obj;

            RoutedEventArgs args = new RoutedEventArgs();

            if ((bool)e.NewValue)
            {
                source.OnExpanded(args);
            }
            else
            {
                source.OnCollapsed(args);
            }

            source.UpdateVisualState(true);
        }