/// <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(source._useTransitions);
        }
        /// <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._useTransitions = false;
                    source.IsExpanded      = false;
                }
            }
            else
            {
                source._useTransitions = true;
            }

            source.UpdateVisualState(source._useTransitions);
        }