첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

TestProject.zip
다운로드

▶ MainWindow.xaml

<Window x:Class="TestProject.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:lc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
    Width="800"
    Height="600"
    Title="비선형 레이아웃 구축하기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <Grid>
        <lc:LayoutControl
            Background="#ffeaeaea"
            Orientation="Vertical">
            <lc:LayoutGroup Orientation="Horizontal">
                <lc:LayoutGroup Orientation="Vertical">
                    <lc:LayoutGroup
                        View="GroupBox"
                        Orientation="Horizontal"
                        IsCollapsible="True"
                        Header="Group 1">
                        <lc:LayoutItem
                            VerticalAlignment="Stretch"
                            Label="Item 1 :">
                            <TextBox />
                        </lc:LayoutItem>
                        <lc:LayoutGroup
                            lc:LayoutControl.AllowHorizontalSizing="True"
                            Orientation="Vertical">
                            <lc:LayoutItem
                                VerticalAlignment="Stretch"
                                Label="Item 2 :">
                                <TextBox />
                            </lc:LayoutItem>
                            <lc:LayoutItem
                                VerticalAlignment="Stretch"
                                Label="Item 3 :">
                                <TextBox />
                            </lc:LayoutItem>
                        </lc:LayoutGroup>
                    </lc:LayoutGroup>
                    <lc:LayoutItem
                        lc:LayoutControl.AllowVerticalSizing="True"
                        VerticalAlignment="Stretch"
                        Label="Item 4 :">
                        <TextBox />
                    </lc:LayoutItem>
                </lc:LayoutGroup>
                <lc:LayoutGroup
                    lc:LayoutControl.AllowHorizontalSizing="True"
                    View="Tabs">
                    <lc:LayoutGroup
                        Orientation="Vertical"
                        Header="Tab 1">
                        <lc:LayoutItem Label="Item 5 :">
                            <TextBox />
                        </lc:LayoutItem>
                        <lc:LayoutItem
                            VerticalAlignment="Stretch"
                            Label="Item 6 :">
                            <TextBox />
                        </lc:LayoutItem>
                    </lc:LayoutGroup>
                    <lc:LayoutGroup
                        Orientation="Vertical"
                        Header="Tab 2">
                        <lc:LayoutItem Label="Item 7 :">
                            <TextBox />
                        </lc:LayoutItem>
                        <lc:LayoutItem Label="Item 8 :">
                            <TextBox />
                        </lc:LayoutItem>
                    </lc:LayoutGroup>
                </lc:LayoutGroup>
            </lc:LayoutGroup>
            <lc:LayoutGroup Orientation="Horizontal">
                <lc:LayoutItem
                    HorizontalAlignment="Left"
                    Label="Item 9 :">
                    <TextBox Width="100" />
                </lc:LayoutItem>
                <lc:LayoutItem Label="Item 10 :">
                    <TextBox />
                </lc:LayoutItem>
                <lc:LayoutItem
                    HorizontalAlignment="Right"
                    Label="Item 11 :">
                    <TextBox Width="100" />
                </lc:LayoutItem>
            </lc:LayoutGroup>
        </lc:LayoutControl>
    </Grid>
</Window>

 

728x90

 

▶ MainWindow.xaml.cs

using System.Windows;

namespace TestProject
{
    /// <summary>
    /// 메인 윈도우
    /// </summary>
    public partial class MainWindow : Window
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor
        ////////////////////////////////////////////////////////////////////////////////////////// Public

        #region 생성자 - MainWindow()

        /// <summary>
        /// 생성자
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
        }

        #endregion
    }
}
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요