For the Q3 2009 release, we have added a few important new features to the RadDock. The first of these features is the ability to set the tab strip alignment and/or visibility on DocumentTabStrip and ToolTabStrip instances. The second feature we have added is the ability to implement your own manual drag and drop behavior.
Tab Alignment and Visibility
When working with ToolTabStrips and DocumentTabStrips in the Q3 release, you will notice that we have added two new properties. The first of these properties, TabStripAlignment, allows you to set the alignment of tabs within their parent TabStrip. The second of these properties, TabStripVisible, allows you to specify whether or not the tabs should be visible. You can see these features in action in the RadControls for WinForms demo application under RadDock -> TabStrip Properties.
Manual Drag and Drop Behavior
Drag and drop automation is now possible with the RadDock. The DragDropService of the RadDock now contains a property, DragDropBehavior, that you can set to auto or manual. Setting this property to manual allows you to implement your own custom drag and drop behavior based on the events provided by the DragDropService object.
Using a manual implementation of this service, I've created a simple class that allows for it's users to animate the dragging of a ToolWindow through one line of code.
The class, RadDockAutomation, takes a RadDock in its constructor. In calling the DoDragDrop method, you must specify a ToolWindow to drag and drop, the way in which to dock it, and the ToolWindow to dock it inside of or relative to. Upon calling this method, the DragDropBehavior of the DragDropService is set to manual, two events are subscribed to, and a timer is started.
The timer is responsible for moving the specified DockWindow within its tick event. The PerformDrag method being called calculates the next position the ToolWindow should be moved to on a point by point basis.
The PreviewHitTest event of the DragDropService is responsible for detecting when the DockWindow being moved has reached the specified location. Once it has reached the specified location, the service is stopped and the drag drop automation is completed.
Click here to download the source code used in this post.
Subscribe to be the first to get our expert-written articles and tutorials for developers!
All fields are required