Hey there, quick question, I want to drag a listbox item fromthe listbox to a grid cell. The listbox item is a custom textbox control called "cEmployeeItem". The listbox itemssource is bound to the view model and loaded on a button push.
I can't seem to get the listbox item to drag only, I can only get the entire listbox itself to drag. Below is my xaml. I commented out the datatemplate section because nothing was happening (not able to drag at all):
<
="True" >
<!--<ListBox.ItemTemplate>
<DataTemplate>-->
>
="True" />
<!--</DataTemplate>
</ListBox.ItemTemplate>-->
Hello,
It is important to have set the Background on the element where DragSource is attached, otherwise the mouse events are not fired for that element. Also it seems that your data template has no root element where you have to attach the DragSource.
Plamen.