赞
踩
开始原因是由于并不知道使用数据模板,需要加入数据源,要找到数据源的作用域。后面的命令部分代码如下:
public ICommand SelectOrUnSelectAll
{
get { return new GeneryModelSoft.Commands.Command(p => SelectAll()); }
}
protected void SelectAll()
{
if (generyModelList != null&&isSelectFlag==false)
{
for (int i = 0; i < generyModelList.Count; i++)
{
generyModelList[i].IsSelected = true;
}
isSelectFlag = true;
}
else if (generyModelList != null && isSelectFlag == true)
{
for (int i = 0; i < generyModelList.Count; i++)
{
generyModelList[i].IsSelected = false;
}
isSelectFlag = false;
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。