16 Mayıs 2010 Pazar

Silverlight Grid Control

<Grid x:Name="LayoutRoot" Background="White" ShowGridLines="True">
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
</Grid>

sample1_thumb

<Grid x:Name="LayoutRoot" Background="White" ShowGridLines="True">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="100"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Button Content="Auto Size" Height="150" Grid.Row="0" Grid.Column="0" ></Button>
        <Button Content="Pixel Size" Height="150" Grid.Row="1" Grid.Column="1"></Button>
        <Button Content="Star Size" Height="150" Grid.Row="2" Grid.Column="2"></Button>
</Grid>

sample2_thumb

<RowDefinition Height="30*"></RowDefinition>
<RowDefinition Height="40*"></RowDefinition>

sample3_thumb

<Button Content="Auto Size" Height="150" Width="300" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" ></Button>

 

reference : http://www.silverlightshow.net/items/Using-Silverlight-Grid-Control.aspx

Hiç yorum yok:

Yorum Gönder