Ejemplo n.º 1
0
        /// <summary>
        /// Static handler for the IsEnabledChanged event to update the display state of the control
        /// </summary>
        private static void OnIsEnabledChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            GridSplitter gridSplitter = obj as GridSplitter;

            Debug.Assert(obj != null);

            if ((bool)args.NewValue == false)
            {
                // Setting this here instead of in Xaml because none of the components in the default style have the IsTabStop property
                gridSplitter.IsTabStop = false;
                gridSplitter.ChangeVisualState();
            }
            else
            {
                // Setting this here instead of in Xaml because none of the components in the default style have the IsTabStop property
                gridSplitter.IsTabStop = true;
                gridSplitter.ChangeVisualState();
            }
        }