private void GridSplitter_Loaded(object sender, RoutedEventArgs e) { _resizeDirection = GetResizeDirection(); _resizeBehavior = GetResizeBehavior(); // Adding Grip to Grid Splitter if (Element == default(UIElement)) { CreateGripperDisplay(); Element = _gripperDisplay; } var hoverWrapper = new GripperHoverWrapper( CursorBehavior == SplitterCursorBehavior.ChangeOnSplitterHover ? this : Element, _resizeDirection, GripperCursor, GripperCustomCursorResource); ManipulationStarted += hoverWrapper.SplitterManipulationStarted; ManipulationCompleted += hoverWrapper.SplitterManipulationCompleted; _hoverWrapper = hoverWrapper; }
private void GridSplitter_Loaded(object sender, RoutedEventArgs e) { _resizeDirection = GetResizeDirection(); _resizeBehavior = GetResizeBehavior(); GridSplitterGripper gripper; // Adding Grip to Grid Splitter if (Element == default(UIElement)) { gripper = new GridSplitterGripper( _resizeDirection, GripperForeground); } else { var content = Element; Element = null; gripper = new GridSplitterGripper(content, _resizeDirection); } Element = gripper; gripper.KeyDown += Gripper_KeyDown; var hoverWrapper = new GripperHoverWrapper( CursorBehavior == SplitterCursorBehavior.ChangeOnSplitterHover ? this : Element, _resizeDirection, GripperCursor, GripperCustomCursorResource); ManipulationStarted += hoverWrapper.SplitterManipulationStarted; ManipulationCompleted += hoverWrapper.SplitterManipulationCompleted; _hoverWrapper = hoverWrapper; }