This is a migrated thread and some comments may be shown as answers.

Drag and Drop with AutoBringIntoView

2 Answers 53 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Audrey
Top achievements
Rank 1
Audrey asked on 27 Jan 2011, 10:43 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Tsvyatko
Telerik team
answered on 27 Jan 2011, 12:52 PM
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>>
0
Audrey
Top achievements
Rank 1
answered on 31 Jan 2011, 10:17 AM
Hi,

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

Audrey
Tags
DragAndDrop
Asked by
Audrey
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Audrey
Top achievements
Rank 1
Share this question
or