Silverlight 4.0 可拖动排序的ListBox

Silverlight 4.0 可拖动排序的ListBox,第1张

概述 引用:System.Windows.Controls.Toolkit xmlns:mswindows="clr-namespace:Microsoft.Windows;assembly=System.Windows.Controls.Toolkit" 然后用ListBoxDragDropTarget套在ListBox外,并设置ItemsPanelTemplate。 ----ListBoxDrag

 引用:System.windows.Controls.Toolkit

xmlns:mswindows="clr-namespace:Microsoft.windows;assembly=System.windows.Controls.Toolkit"

然后用ListBoxDragDropTarget套在ListBox外,并设置ItemsPanelTemplate。
----ListBoxDragDropTarget并不能作用于virtualized容器(ListBox的默认容器),所以必须改变ListBox的ItemsPanelTemplate容器,比如说像这样加个StackPanel进去取代virtualized默认容器即可 .

<toolKit:ListBoxDragDropTarget AllowDrop="True">                <ListBox x:name="AcceptListBox" Height="200" WIDth="200" displayMemberPath="name">                    <ListBox.ItemsPanel>                        <ItemsPanelTemplate>                            <StackPanel OrIEntation="Vertical"/>                        </ItemsPanelTemplate>                    </ListBox.ItemsPanel>                </ListBox> </toolKit:ListBoxDragDropTarget>

除了ListBoxDragDropTarget控件还有如下控件也支持这种效果:
ListBoxDragDropTarget[已实现]
TreeVIEwDragDropTarget -[实现TreevIEw拖拽]
DataGrIDDragDropTarget-[DataGrID控件支持]
DataPointSerIEsDragDropTarget-[尚未测试.]

原文地址:http://www.cnblogs.com/chenkai/archive/2010/05/26/1744226.html

总结

以上是内存溢出为你收集整理的Silverlight 4.0 可拖动排序的ListBox全部内容,希望文章能够帮你解决Silverlight 4.0 可拖动排序的ListBox所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1013373.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存