Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > PanelBar > RadPanelBar - Dragging Items Out

Not answered RadPanelBar - Dragging Items Out

Feed from this thread
  • Enal avatar

    Posted on Oct 13, 2011 (permalink)

    Hi,

    Context:

    I am trying to replace a toolkit Accordion with a RadPanelBar. The Accordion contains ListBoxes. ListBoxItems can be dragged out and be dropped onto a Grid. Think of it as a Tool Box with Tools to be dragged onto a work space. This works fine with DragDropManager. I am rendering an Image as DragVisual and all looks good. (note: This is using the new DragDropManager, not RadDragAndDropManager)

    Enter RadPanelBar:

    Drag & Drop stops functioning once the Accordion is replaced with a RadPanelBar. RadPanelBar seems to insist that I want to drag between its panels and overrides the DragVisual and renders the class name with a little icon below. How can I disable this behavior and use my own visuals?

    If I set IsDragDropEnabled=false it also disables Drag on the ListBoxItems, which have DragDropManager.AllowDrag=true and DragDropManager.AllowCaptureDrag=true. Events are registered with  DragDropManager.AddDragInitializeHandle etc. I reveive the DragInitialize event but nothing else.

    As a simple example: Could you please show how to set up the following RadPanelBar so it is possible to drag the ListBoxItems out and drop them into a Grid (or other basic control) while displaying a drag cue that visualizes the ListBoxItem with image?

    Thanks!


    <telerik:RadPanelBar x:Name="TestPanelBar">
        <telerik:RadPanelBarItem Header="TestPanel">
            <ListBox Name="TestBox">
                <ListBoxItem Name="TestItem_1">
                    <Image  Source="/TestProject;component/Images/image_1.png" />
                </ListBoxItem>
                <ListBoxItem Name="TestItem_2">
                    <Image  Source="/TestProject;component/Images/image_2.png" />
                </ListBoxItem>
            </ListBox>
        </telerik:RadPanelBarItem>
    <telerik:RadPanelBar/>

    Reply

  • Enal avatar

    Posted on Oct 17, 2011 (permalink)

    Looks like I figured it out. Setting Handled=true on the D&D event stops TK from taking over and lets me do what I want.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > PanelBar > RadPanelBar - Dragging Items Out
Related resources for "RadPanelBar - Dragging Items Out"

Silverlight PanelBar Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]