Chinaunix首页 | 论坛 | 博客
  • 博客访问: 12403248
  • 博文数量: 1293
  • 博客积分: 13501
  • 博客等级: 上将
  • 技术积分: 17974
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-08 18:11
文章分类

全部博文(1293)

文章存档

2019年(1)

2018年(1)

2016年(118)

2015年(257)

2014年(128)

2013年(222)

2012年(229)

2011年(337)

分类: C#/.net

2015-12-01 11:30:25

代码片断:

  1.             Label tmpLabel;
  2.             string testStr = string.Empty;

  3.             for (int i = 0; i < this.ParentGrid.Children.Count; i++)
  4.             {
  5.                 if (this.ParentGrid.Children[i] is Label)
  6.                 {
  7.                     tmpLabel = this.ParentGrid.Children[i] as Label;
  8.                     if (tmpLabel.Tag != null && !string.IsNullOrWhiteSpace(tmpLabel.Tag.ToString()))
  9.                     {
  10.                         if (Convert.ToInt32(tmpLabel.Tag) == (int)dataconnect)
  11.                             tmpLabel.Content = newText;
  12.                     }
  13.                 }
  14.             }
参考网址:
阅读(2523) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~