views:

60

answers:

0

I've got a Silverlight 3 app that has two ListBoxes that I need to be able to drag items between. I've got the toolkit control working so that I can drag from ListBox lbA to ListBox lbB but i then can't drag the item from lbB back to lbA.

<toolkit:ListBoxDragDropTarget mswindows:DragDrop.AllowDrop="True">
    <ListBox x:Name="lbA" Style="{StaticResource ListBoxStyle}">
        <ListBox.ItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding DisplayMember}"/>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
</toolkit:ListBoxDragDropTarget>

<toolkit:ListBoxDragDropTarget mswindows:DragDrop.AllowDrop="True">
    <ListBox x:Name="lbB" Style="{StaticResource ListBoxStyle}" Width="350">
        <ListBox.ItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding DisplayMember}"/>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
</toolkit:ListBoxDragDropTarget>

I'm binding lbA to an ObservableCollection of MyObject items which is a parent class for objects MyObjectA and MyObjectB (and there is a mix of ChildObjectA and ChildObjectB items). Is the one way behaviour I'm seeing due to binding to a collection MyObjects or something else i'm missing?