I'm currently working on enabling drag-and-drop support for our company app.
The error I keep getting seems weird to me.
What this says is that
The property 'DragDropHelper.IsDragSource' does not exist in XML namespace 'clr-namespace:DragAndDrop;assembly=DragAndDrop'. Line 61 Position 83
The property is an attached property in the class I found in the Internet in the samples and modified it a bit. Here is property declaration:
namespace DragAndDrop {
public class DragDropHelper
{
public static readonly DependencyProperty IsDragSourceProperty =
DependencyProperty.RegisterAttached("IsDragSource", typeof (bool), typeof (DragDropHelper),
new UIPropertyMetadata(false, IsDragSourceChanged));
public static bool GetIsDragSource(DependencyObject obj)
{
return (bool) obj.GetValue(IsDragSourceProperty);
}
public static void SetIsDragSource(DependencyObject obj, bool value)
{
obj.SetValue(IsDragSourceProperty, value);
}
It seems to me that attached property is completely valid, isn't it? This DragDropHelper is included into a class library, that I reference from the main client app. When I try to set the value of the property in a client app:
<ListView x:Uid="list" x:Name="CurrentFolderItemsControl" drag:DragDropHelper.IsDragSource="true" />
VS2010 says that property doesn't exist in XML namespace. The XAML document is a resource dictionary
which is merged into main client app resources, because it contains styles for our control.
It's even more weird because I created a class within main app that has attached property, then set property value in XAML markup - app compiled OK