Set Row Height and column Width for Grid

image_pdfimage_print


   
        
<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="GridButton" Height="193" Width="219">
    <Grid>
        <Button Name="btnGrid" Height="100" Width="150">
            <Grid Height="90" Width="140">
                <Grid.RowDefinitions>
                    <RowDefinition Height="33*" />
                    <RowDefinition Height="33*" />
                    <RowDefinition Height="33*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="33*" />
                    <ColumnDefinition Width="33*" />
                    <ColumnDefinition Width="33*" />
                </Grid.ColumnDefinitions>
                <Label Content="Left" Grid.Row="0" Grid.Column="0" />
                <Label Content="Middle" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Center" HorizontalAlignment="Center" />
                <Label Content="Right" Grid.Row="2" Grid.Column="2" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
            </Grid>
        </Button>
    </Grid>
</Window>