I\'m trying to retrieve of all elements by type and tag name. I already found some examples:
How can I find WPF controls by name or type?
https://stackoverfl
You could use the following FindVisualChildren method:
FindVisualChildren
Find all controls in WPF Window by type
...and simply filter the results:
string tagName = "tagname"; IEnumerable elements = FindVisualChildren(this).Where(x => x.Tag != null && x.Tag.ToString() == tagName);