블로그 이미지
Magic_kit
study 관련자료를 한곳으로 자기 개발 목적으로 재태크 재무 관리 목적으로 일상생활의 팁을 공유 하기 위하여 블로그를 개설 하였습니다.

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Category

Recent Post

Recent Comment

Archive

2009. 11. 25. 16:13 .Net Project/SilverLight 3.0
반응형
- Grid
  그리드(Grid)는 실버라이트에서 제공하는 가장 강력한 레이아웃 컨트롤 입니다
  그리드를 이용하면 행과 열을 정의해 셀로 나눈 후 자신 컨트롤을 나누어진 셀에 배치 가능

- 화면 표시
 

<UserControl x:Class="RiaGrid.MainPage"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    mc:Ignorable="d"

    d:DesignHeight="300" d:DesignWidth="400">

 

    <Grid x:Name="ctlList"
        
 Background="DarkOrange" ShowGridLines="True" Width="400" Height="300">

        <Grid.RowDefinitions>

            <RowDefinition Height="50"></RowDefinition>

            <RowDefinition Height="100"></RowDefinition>

            <RowDefinition Height="Auto"></RowDefinition>

            <RowDefinition Height="Auto"></RowDefinition>

            <RowDefinition Height="Auto"></RowDefinition>

            <RowDefinition Height="Auto"></RowDefinition>

            <RowDefinition Height="Auto"></RowDefinition>

        </Grid.RowDefinitions>

       

        <Grid.ColumnDefinitions>

            <ColumnDefinition Width="2*"></ColumnDefinition>

            <ColumnDefinition Width="3*"></ColumnDefinition>

          

        </Grid.ColumnDefinitions>

        <TextBlock x:Name="lblText" Text="1행1열" ></TextBlock>

        <Button x:Name="btnName"
                
 Content="클릭버튼"
                 
 Grid.Row="0" Grid.Column="1" Width="100" Height="30"></Button>

        <TextBox x:Name="txtName" Text="2행1열"
                  Grid.Row="1" Grid.Column="0" Grid.RowSpan="2"></TextBox>

        <Button x:Name="cmdResult" Content="3행3열"
               
 Grid.Row="2" Grid.Column="0"
               
 Grid.ColumnSpan="2" FontSize="20"></Button>

        <TextBox x:Name="txtNumber" Text="4행4열"
               
 Grid.Row="3" Grid.Column="0"></TextBox>

        <TextBox x:Name="txtAddress" Text="5행 5열"
               
 Grid.Row="4" Grid.Column="0"></TextBox>

        <TextBox x:Name="txtGac" Text="5행 5열"
               
 Grid.Row="5" Grid.Column="0"></TextBox>

        <TextBox x:Name="txtGaA" Text="6행 6열"
               
 Grid.Row="6" Grid.Column="0"></TextBox>

       

        <Button x:Name="cmd" Content="속성"
                
 Foreground="Black" Grid.Row="3" Grid.Column="1"

                 HorizontalAlignment="Left" VerticalAlignment="Bottom"></Button>

        <Button x:Name="cmd1" Content="속성1"
                
 Foreground="Black" Grid.Row="4" Grid.Column="1"

                 HorizontalAlignment="Right" VerticalAlignment="Bottom"></Button>

        <Button x:Name="cmd2" Content="속성2"
                 Foreground
="Black" Grid.Row="5" Grid.Column="1"

                 HorizontalAlignment="Center"
                 VerticalAlignment
="Bottom"></Button>

        <Button x:Name="cmd3" Content="속성3"
                 Foreground
="Black" Grid.Row="6" Grid.Column="1"

                 HorizontalAlignment="Stretch" 
                 VerticalAlignment
="Bottom"></Button>
 

    </Grid>    

</UserControl> 




반응형
posted by Magic_kit