WPF SelectedIndex

代码示例


int正常传值时不会像引用类型一样传地址,但是直接传SelectedIndex会出现类似传地址的效果,解决方案是使用一个中间变量。
SelectedIndexOld = SelectedIndex ; SelectedIndex = -1;
SelectedIndexOld=-1
int s = SelectedIndex; SelectedIndex = -1; SelectedIndexOld = s;
SelectedIndexOld!=-1
原文地址:https://www.cnblogs.com/QuXingBai-Blog/p/14066681.html