Tag Archives: find controls by name

Find controls by name in WPF with C#

This example lets you find controls by entering their names. When you enter a control’s name and a color and click Apply, the program changes the selected control’s background color. You can use XAML code to give names to the … Continue reading

Posted in controls, wpf | Tagged , , , , , , , , , | Leave a comment

Find controls by name in C#

This example shows how you can search a control hierarchy to find controls by name in C#. The following FindControl function does all of the work. It takes as parameters the parent control to check first and the name to … Continue reading

Posted in controls | Tagged , , , , , , , , | 3 Comments