I have a grid with 7 rows and 7 columns. I want to put in each cell a control dynamically.
To add the controls I use this code
Rectangle newRectangle = new Rectangle();
newRectangle.Tap += new EventHandler<GestureEventArgs>(Rectangle_KeyDown);
newRectangle.Fill = HighlightColor;
Grid.SetColumn(newRectangle, i);
Grid.SetRow(newRectangle, ii);
grid1.Children.Add(newRectangle);
How can I get one of those controls from position x,y?
I thought something like
Grid.GetColumn( ?? );
Grid.GetRow( ?? );
But I don’t know how to continue.
I realy hope someone can help me.
There is no built in function for that so you should do the searching manually. But you can easily write such search function e.g with Linq: