Exemple #1
0
        private static void SetupAttachedProperty(DependencyObject d)
        {
            var containingGrid = d as Grid;

            if (containingGrid == null)
            {
                throw new ArgumentException("TargetColumnProperty expected to be attached to a grid.");
            }

            if (GetSplitterKeyboardBehavior(containingGrid) == null)
            {
                var behavior = new GridSplitterKeyAcceleratorBehavior();
                behavior.Attach(containingGrid);
                SetSplitterKeyboardBehavior(containingGrid, behavior);
            }
        }
        private static void SetupAttachedProperty(DependencyObject d)
        {
            var containingGrid = d as Grid;
            if (containingGrid == null)
                throw new ArgumentException("TargetColumnProperty expected to be attached to a grid.");

            if (GetSplitterKeyboardBehavior(containingGrid) == null)
            {
                var behavior = new GridSplitterKeyAcceleratorBehavior();
                behavior.Attach(containingGrid);
                SetSplitterKeyboardBehavior(containingGrid, behavior);
            }
        }
 private static void SetSplitterKeyboardBehavior(DependencyObject grid, GridSplitterKeyAcceleratorBehavior behavior)
 {
     grid.SetValue(SplitterKeyboardBehaviorProperty, behavior);
 }
Exemple #4
0
 private static void SetSplitterKeyboardBehavior(DependencyObject grid, GridSplitterKeyAcceleratorBehavior behavior)
 {
     grid.SetValue(SplitterKeyboardBehaviorProperty, behavior);
 }