Drag and Drop with AutoBringIntoView

3 posts, 1 answers
  1. Audrey
    Audrey avatar
    9 posts
    Member since:
    Oct 2010

    Posted 27 Jan 2011 Link to this post

    Hi,

    I used a Listbox with a WrapPanel in an ItemsPanelTemplate, like this :

    <ListBox x:Name="ProgrammingBox" SelectionMode="Extended">
          <ListBox.ItemsPanel>
                   <ItemsPanelTemplate>
                        <toolkit:WrapPanel  />
                  </ItemsPanelTemplate>
           </ListBox.ItemsPanel>
    </ListBox>

    I used the RadDragAndDropManager.
    I have a ListBox with an average of 150-200 items, and I want to drag and drop items in my ListBox to reorder them. I want to move an item and that the scrollbar move automaticaly itself. I use the AutoBringIntoView property but it don't work in my case.
    This is my code-behind : 

    RadDragAndDropManager.AddDropQueryHandler(ProgrammingBox, new EventHandler<DragDropQueryEventArgs>(OnDropQuery));
    RadDragAndDropManager.AddDragQueryHandler(ProgrammingBox, new EventHandler<DragDropQueryEventArgs>(OnDragQuery));
    RadDragAndDropManager.AddDropInfoHandler(ProgrammingBox, new EventHandler<DragDropEventArgs>(OnDropInfo));
    RadDragAndDropManager.AddDragInfoHandler(ProgrammingBox, new EventHandler<DragDropEventArgs>(OnDragInfo));
     
    RadDragAndDropManager.AutoBringIntoView = true;

    Audrey
  2. Answer
    Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 27 Jan 2011 Link to this post

    Hi Audrey,

    Please, check the attached example demonstrating this behavior. Note that in Q3 release there were some issues with this functionality, so please use our Q3 SP1.

    Regards,
    Tsvyatko
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. Audrey
    Audrey avatar
    9 posts
    Member since:
    Oct 2010

    Posted 31 Jan 2011 Link to this post

    Hi,

    thank you ! I updated with the Q3 SP1, and my problem is solved !

    Audrey
Back to Top