I am trying to get drag 'n drop working to be able to drag files on to my SL5 OOB app. I have gotten it working with a TextBox, but can't get it to work with TreeView/TreeViewItem.
Here's the xaml:
<sdk:TreeView Style="{StaticResource TreeViewStyle1}"
ItemsSource="{Binding Items}" AllowDrop="True" Drop="AnyDropTarget_OnDrop">
<sdk:TreeView.ItemTemplate>
<sdk:HierarchicalDataTemplate ItemsSource="{Binding Children}" >
<TextBlock Text="{Binding Name}" Foreground="WhiteSmoke" AllowDrop="True" Drop="AnyDropTarget_OnDrop" />
</sdk:HierarchicalDataTemplate>
</sdk:TreeView.ItemTemplate>
</sdk:TreeView>
What am I doing wrong?
Thanks for any insights....
UPDATE:
It appears the OOB app has to be started from the local computer; when started from VS2012, d 'n d appears not to work at all.
In the xaml above, is it possible to make the TreeViewItem the drop target in addition to/instead of the TextBlock?
UPDATE THE SECOND:
What's the best way to extract the TreeView.ItemTemplate to make it easily 'styleable'?