Can't drag from ListBox

11 posts, 2 answers
  1. francois
    francois avatar
    8 posts
    Member since:
    Feb 2011

    Posted 28 Jul 2011 Link to this post

    Hello,

    I'm doing a small project and just upgraded to the latest version of WPF telerik control. In my project I had some drag and drop between grid and listbox. Pretty much the same as the one in the demo (http://demos.telerik.com/silverlight/#DragAndDrop/TreeToGrid) this one but the wpf version. I used to be able to drag my item from the list without any problem but now it just doesn't work. The new WPF demo does not seem to work too.

    Any ideas to what is wrong?

    thank you very much
  2. Answer
    Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 01 Aug 2011 Link to this post

    Hi Francois,

    Please, try setting this attached property to True on these ListBoxItem instances that you are going to drag: Telerik.Windows.DragDrop.DragDropManager.AllowCapturedDrag. The easiest way to achieve this is to use a style like this:
    <Style TargetType="ListBoxItem" >
              <Setter Property="telerik:RadDragAndDropManager.AllowDrag" Value="True" />
              <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
    </Style>

    Please, do not hesitate to contact us if any further inquiries occur.

    Kind regards,
    Ivan Ivanov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. francois
    francois avatar
    8 posts
    Member since:
    Feb 2011

    Posted 01 Aug 2011 Link to this post

    Hi Ivan,

    thank you for you quick answer, but is this suppose to work for the WPF control?

    Telerik.Windows.DragDrop.DragDropManager.AllowCapturedDrag does not exists in the assembly that I have. Maybe I have the wrong version but the online help doesn't state a properties by that name either.

    http://www.telerik.com/help/wpf/telerik.windows.controls-telerik.windows.dragdrop.dragdropmanager_members.html


    Regards,

    François
  5. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 01 Aug 2011 Link to this post

    Hello Francois,

     DragDropManager.AllowCapturedDrag is relatively new property available after version 2011.2.718. It is used in scenarios in which we need to perform drag drop operations on control that captures the mouse and interferes with drag drop framework execution (as in WPF listbox). We are currently updating our help articles as well in order to include this information as well.

    Kind regards,
    Tsvyatko
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  6. francois
    francois avatar
    8 posts
    Member since:
    Feb 2011

    Posted 01 Aug 2011 Link to this post

    Hi Ivan,

    thank you for you quick response. I will try to apply the latest hot fix and try your solution.

    Regards,

    François
  7. francois
    francois avatar
    8 posts
    Member since:
    Feb 2011

    Posted 01 Aug 2011 Link to this post

    Hi Ivan,

    I tried to upgrade to the latest version available and I still can't see that propertie. I downloaded 2011.2.0725 for .NET 3.5

    is this property only available while using .NET 4.0 ? My project can only use .NET 3.5

    Regards,

    François
  8. Answer
    Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 03 Aug 2011 Link to this post

    Hello Francois,

    It is available in 2011.2.725 for .NET 3.5. I am attaching a screenshot that provides some more extensive information of its location.

    Kind regards,
    Ivan Ivanov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
  9. francois
    francois avatar
    8 posts
    Member since:
    Feb 2011

    Posted 03 Aug 2011 Link to this post

    Thank you for your time.

    The solution you provided solves my problem :)

    Regards,

    Francois
  10. Ronald
    Ronald avatar
    12 posts
    Member since:
    Aug 2010

    Posted 11 Aug 2011 Link to this post

    Hi,

    i have basically the same problem (drag doesn't work from list box in WPF). I have downloaded the hotfix 2011.2.0808 for WPF for .net 4.0. However the AllowCaptureDrag property is not available as you can see in the screenprint. Am i doeing something wrong here or has the new property disappeared?

    TIA
    Ronald Steenbergen
  11. francois
    francois avatar
    8 posts
    Member since:
    Feb 2011

    Posted 11 Aug 2011 Link to this post

    Hi Ronald,

    the property can be found under Telerik.Windows.DragDrop.DragDropManager

    you are currently looking at Telerik.Window.Controls.DragDrop.RadDragAndDropManager

    I made the same mistake at first ;)

    François
  12. Ronald
    Ronald avatar
    12 posts
    Member since:
    Aug 2010

    Posted 11 Aug 2011 Link to this post

    Hi François

    Indeed, you are so right. I feel stupid...

    Ronald
Back to Top
UI for WPF is Visual Studio 2017 Ready