我正在尝试在两个 Telerik 列表框之间实现拖放功能。我已经使用以下代码完成了
列表框 1:
<telerik:RadListBox x:Name="name1" SelectionMode="Multiple" >
<telerik:RadListBox.DragVisualProvider>
<telerik:ScreenshotDragVisualProvider />
</telerik:RadListBox.DragVisualProvider>
<telerik:RadListBox.DragDropBehavior>
<telerik:ListBoxDragDropBehavior />
</telerik:RadListBox.DragDropBehavior>
</telerik:RadListBox>
列表框 2:
<telerik:RadListBox x:Name="name2" AllowDrop="True">
<telerik:RadListBox.DragDropBehavior>
<telerik:ListBoxDragDropBehavior />
</telerik:RadListBox.DragDropBehavior>
</telerik:RadListBox>
添加了这种风格:
<Style TargetType="telerik:RadListBoxItem" >
<Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
</Style>
它工作得很好,但我不希望元素在被拖到另一个列表框时从源列表框中删除