WPF 中使用MVVM模式后,找回ListBox中的ListBoxItem元素

ListBoxItem lstitem = this.list.ItemContainerGenerator.ContainerFromItem(m) as ListBoxItem;

其中this.list是使用了mvvm模式绑定了数据集的ListBox

原文地址:https://www.cnblogs.com/zhaolili/p/5133968.html