K
K Viltersten
I have a Grid object with some controls
added to it. When i need to access any
of them, i refer to them by the index.
grid.Children[3].Content = "text";
As you surely understand, it's a smelly
solution and i'd like to change it.
How can i refer to the elements by
their names? The below doesn't compile
since the index needs to be int type.
grid.Children["MyStuff"];
Any advise would be great.
added to it. When i need to access any
of them, i refer to them by the index.
grid.Children[3].Content = "text";
As you surely understand, it's a smelly
solution and i'd like to change it.
How can i refer to the elements by
their names? The below doesn't compile
since the index needs to be int type.
grid.Children["MyStuff"];
Any advise would be great.