I have written a WPF Application in VB.net. My Startup URI is MainWindow.xaml. The application is working fine.
However, I want to go back and use code to modify the attributes of some button controls. Specifically, I want to change the buttontext. To do this, I want to iterate through the controls collection to locate the buttons I want to change.
So I have entered this to iterate through the controls collection:
For Each myBtn as Control in Me.Controls
Next
But I get a message that says: "Controls is not a member of MainWindow".
I have searched for several days and have not been able to find an answer.
What am I doing wrong?...TIA.