AllowDrop of *DragDropTarget not available in latest Silverlight toolkit 4

I know this has been discussed a number of times but I've been through all posts on the internet and nothing helped solve my problem.

I am making use of PanelDragDropTarget but can't get it to build when used AllowDrop property in my xaml. I've of course registered both namespaces but still get following error:

The property 'AllowDrop' does not exist on the type 'PanelDragDropTarget' in the XML namespace 'clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit'. C:MainPage.xaml

or

The property 'AllowDrop' does not exist on the type 'PanelDragDropTarget' in the XML namespace 'clr-namespace:Microsoft.Windows;assembly=System.Windows.Controls.Toolkit'. c:MainPage.xaml

The Toolkit library referenced is of version 4.0.5.0 and I also have referenced Toolkit.Internals. I am using VS 2008.


Sounds like you are actually working in Silverlight 3 not 4. The AllowDrop is a property of the UIElement added in Silverlight 4. It is related to the drag drop of file lists between the host system and silverlight. It is not related to the DragDrop framework supplied by the toolkit which focuses on the dragging of elements within Silverlight.

You should instead be handling the DragEnter event of the PanelDragDropTarget and assigning your prefered value to the Effects propery of the eventargs in that event.

链接地址: http://www.djcxy.com/p/34544.html

上一篇: 运行时Silverlight DockPanel异常

下一篇: * DragDropTarget的AllowDrop在最新的Silverlight工具包4中不可用