vendredi 27 mars 2015

How can I check only that textboxes are that Visibility.Visible in the running program? WPF

How can I check only that textboxes are that Visibility.Visible in the running program?


I have code for Winforms



foreach (var textbox in rootControl.Controls.OfType<TextBox>().Where(t => t.IsVisible))


But I need that for WPF


I know, It should look smth like this



foreach (TextBox tb in this.FindName.OfType<TextBox>().Where(tb => tb.IsVisible))


Can you please help me this work well?


Aucun commentaire:

Enregistrer un commentaire