Is there any way I can go through all the controls in a window and disable them? For example, make a foreach
that disables one by one of the controls. Something like below, only for WPF, not WinForms.
private void HabilitarControles(bool habilita)
{
foreach (Control c in Controls)
{
c.Enabled = habilita;
foreach (Control con in c.Controls.OfType<Control>())
con.Enabled = habilita;
}
}