Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
565
Toolbar pallette and docking indicators
posted

My app has a toolbar that uses the Infragistics drag drop framework and xamdockmanager.  The tools allow the user to drag a display, plot or other UI widget to the dock manager.  From there on out the dock manager provides the UI for the layout of the items, each in their own content pane.  This works incredibly well and with a bt of styling provides a nice customizable UI for the user.

One thing it doesn't do though is show (and use) the docking indicators as a new tool is dragged to the dock manager.  If no panes are open in the dock manager, the dock manger itself is a drop target and creates a new splitpane and content pane forthe tool.  If there are panes shown then each one of them is a drop target that adds the new widgets pane to the target split pane.

Works well enoguh but isn't nearly as intutive as if the docking indicators were shown if the tool were a real content pane.

How might I achieve showing the docking indicators when dragging one of my display widgets on to the dock manager?

Parents
  • 34830
    Verified Answer
    Offline posted

    Hello dcg1212,

    Thank you for your post.

    The built-in docking indicator for the XamDockManager is handled internally in the source code for the control, and it expects a type of pane to be dragged to it to perform the built-in docking operations. However, the namespace that contains the XamDockManager also contains a copy of this docking indicator as an object named DockingIndicator.

    I would recommend using this docking indicator and keep its visibility set to Collapsed until you being dragging your UI widget from your toolbar. This docking indicator is made up of CardPanels that represent the docking areas. If you were to add a Style to the DockingIndicator.Resources that targets a CardPanel, you could utilize the Infragistics Drag-Drop Framework to make the card panels that represent the docking areas into drop targets. Then, by handling the Drop event on the element that you are dragging, you can check the drop-target card-panels name (which will contain either "Left, Right, Top, or Bottom"), create a pane, and dock it and place your UI widget inside of the pane accordingly. Then, set the visibility of the docking indicator back to collapsed.

    I have created a sample project to demonstrate the above to you. It is attached to this post.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

    DockIndicatorTest.zip
Reply Children
No Data