CodePudding user response:
It's a very simple with WPFCodePudding user response:
You'd say, what is a multi-level?
TextBox text=new TextBox ();
Foreach (var in this. O Controls)
{
If (o.G etType ()==typeof (TextBox))
{
Text=(TextBox) o;
The text. The ReadOnly=true;
}
}
CodePudding user response:
Multi-level because using the pannel and groupbox control, so there is no way to one-time change propertiesCodePudding user response:
As long as you have selected controls readonly attribute, then you can choose more, then one-time change properties, on the change properties of the place, if you have a not readonly attribute in the selected controls, it can'tCodePudding user response:
I don't know how to select different levels of all controlsCodePudding user response:
TextBox text=new TextBox ();
Void ChangePropertyToReadOnly Control (col)
{
Foreach (cols in col. Controls)
{
If (cols. GetType ()==typeof (TextBox))
{
Text=(TextBox) cols.
The text. The ReadOnly=true;
}
ChangePropertyToReadOnly (cols);
}
}