I created a grid in procedural code on my WPF page. Now I want to reference that grid.
Grid grid = (Grid)This.FindName("myGridName")
does not work. Ideas?
When you create an element in code, you need to also call the RegisterName method to allow FindName to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With