ListBoxItem lstitem = this.list.ItemContainerGenerator.ContainerFromItem(m) as ListBoxItem;
其中this.list是使用了mvvm模式绑定了数据集的ListBox
ListBoxItem lstitem = this.list.ItemContainerGenerator.ContainerFromItem(m) as ListBoxItem;
其中this.list是使用了mvvm模式绑定了数据集的ListBox
转载于:https://www.cnblogs.com/zhaolili/p/5133968.html