[code=XML]
<StackPanel>
<Image Source= "/Images/p1br1c3.png ">
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Header= "email to " />
<toolkit:MenuItem Header= "delete it " Click= "DeleteMeClick " />
<toolkit:MenuItem Header= "cancel " />
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</Image>
</StackPanel>
[/code]
现在StackPanel里有很多Image,我现在想长按某个图片,然后就把它自己Remove,请教
[code=C#]
private void DeleteMeClick(object sender, RoutedEventArgs e) {
//这里该怎么写?
}
[/code]
我断点看了一下sender和e,小弟知识有限,没有找到有用的信息
------解决方案--------------------
这个把数据源里选中的行给移除掉,刷新就ok了