It seems like there is quite a bit of confusion about how to go about hiding a row or a column in the Grid control. Take the Grid control as defined below with two rows:
<Grid Name="grid" Height="100" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" Width="200"> <Grid.RowDefinitions> <RowDefinition></RowDefinition> <RowDefinition></RowDefinition> </Grid.RowDefinitions> </Grid>
If you want to hide the first row, simply do the following:
// Hide the first row this.grid.RowDefinitions.Height = new GridLength(0);
The same thing can be done to hide columns except instead of accessing the RowDefinitions collection, access the ColumnDefinitions collection.