开发者

Drag and drop with wpf and nested listview

I have a model like this:

<List>
<Obj Number="1">
    <Group Number="1">
        <Detail Name="AAA"/>
    </Group >
</Obj >
<Obj  Number="2">
    <Group Number="1">
        <Detail Name="BBB"/>
    </Group >
</Obj >
<Obj Number="3">
    <Group Number="1">
        <Detail Name="CCC"/>
    </Group >
    <Group Number="2">
        <Detail开发者_如何转开发 Name="DDD"/>
    </Group >
</Obj >
</Lista> 

I want to be able to drag a Detail into another Group or into white space (in order to create parent elements Obj and Group)

I have created DataTemplate for each entity with a ListView inside Obj and Group entities template. But every example I have found on web can't drag correctly the element because mouse events are raised from the parent ListView and not from the ListView that contains Details entities.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜