本文共 417 字,大约阅读时间需要 1 分钟。
代码片断: - Label tmpLabel;
- string testStr = string.Empty;
-
- for (int i = 0; i this.ParentGrid.Children.Count; i++)
- {
- if (this.ParentGrid.Children[i] is Label)
- {
- tmpLabel = this.ParentGrid.Children[i] as Label;
- if (tmpLabel.Tag != null && !string.IsNullOrWhiteSpace(tmpLabel.Tag.ToString()))
- {
- if (Convert.ToInt32(tmpLabel.Tag) == (int)dataconnect)
- tmpLabel.Content = newText;
- }
- }
- }
参考网址:
http://bbs.csdn.net/topics/320181496
转载地址:http://egmwa.baihongyu.com/