您的位置:首页 > 其它

wpf 遍历控件及其值

2015-11-09 16:50 281 查看
/// <summary>
/// 遍历控件及其值
/// </summary>
/// <param name="uiControls">界面控件</param>
private void SetNotEditable(UIElementCollection uiControls)
{
foreach (UIElement element in uiControls)
{
if (element is TextBox)
{
TextBox txtBox = (element as TextBox);
}
else if (element is Grid)
{
this.SetNotEditable((element as Grid).Children);
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: