Blog Content

    티스토리 뷰

    13.SilverLight3 - Layout - DockPanel

    반응형
    레이아웃 확장 : DockPanel

    DockPanel
    - 특정 방향으로 도킹시킬때 사용되는 레이아웃 컨트롤입니다.
       사용방법은
    WrapPanel 컨트롤 추가 방법과 같습니다.

    [ http://godffs.tistory.com/765 에서 더 보기 클릭 ]

    MainPage.xaml

    [그림 13-1]


    <Grid x:Name="LayoutRoot" Background="White">

            <my:DockPanel LastChildFill="False">

                <Button Content="#1"></Button>

                <Button Content="#2" my:DockPanel.Dock="Top"></Button>

                <Button Content="#3" my:DockPanel.Dock="Right"></Button>

                <Button Content="#4" my:DockPanel.Dock="Bottom"></Button>

            </my:DockPanel>

    </Grid>



    응용 예제입니다.

    FrmDockPanel.xaml

    [그림 13-2]


    <Grid x:Name="LayoutRoot">

        <my:DockPanel LastChildFill="False">

            <Button my:DockPanel.Dock="Left" Background="AliceBlue" Content="#1"></Button>

            <Button my:DockPanel.Dock="Top" Background="AliceBlue" Content="#2"></Button>

            <Button my:DockPanel.Dock="Right" Background="AliceBlue" Content="#3"></Button>

            <Button my:DockPanel.Dock="Bottom" Background="AliceBlue" Content="#4"></Button>

            <Button my:DockPanel.Dock="Left" Background="AliceBlue" Content="#5"></Button>

            <Button my:DockPanel.Dock="Top" Background="AliceBlue" Content="#6"></Button>

            <Button my:DockPanel.Dock="Right" Background="AliceBlue" Content="#7"></Button>

            <Button my:DockPanel.Dock="Bottom" Background="AliceBlue" Content="#8"></Button>

        </my:DockPanel>

    </Grid>



    반응형

    Comments