add RowDefinition from cs xamarin

Code Example - add RowDefinition from cs xamarin

                
                        myGrid.RowDefinitions = new RowDefinitionCollection();
    for (int myCount = 0; myCount < amoutOfRows; myCount++)
    {
          myGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
    }
                    
                
 

xamarin forms set the grid row property of an element programmatically

                        
                                tblock.SetValue(Grid.RowProperty, 4);