To add elements, you will need to do this:
grid.Children.Add(element);
If you want to set a row / column, you can set the properties programmatically before adding it, for example:
element.SetValue(Grid.RowProperty, 1);
You can access the existing part by index, as in your example, if you just need to access a specific child.