■ LayoutControl 엘리먼트 : ItemStyle 속성을 사용해 레이아웃 항목 레이블을 정의하는 DataTemplate 설정하기

----------------------------------------------------------------------------------------------------

<lc:LayoutControl Orientation="Vertical">

    <lc:LayoutControl.ItemStyle>

        <Style TargetType="lc:LayoutItem">

            <Setter Property="LabelTemplate">

                <Setter.Value>

                    <DataTemplate>

                        <StackPanel Orientation="Horizontal">

                            <TextBlock Text="{Binding}" />

                            <TextBlock Text=" : "       />

                        </StackPanel>

                    </DataTemplate>

                </Setter.Value>

            </Setter>

        </Style>

    </lc:LayoutControl.ItemStyle>

    <lc:LayoutGroup

        View="GroupBox"

        Orientation="Vertical"

        Header="Group 1">

        <lc:LayoutItem Label="Item 1">

            <TextBox />

        </lc:LayoutItem>

        <lc:LayoutItem Label="Item 2">

            <TextBox />

        </lc:LayoutItem>

        <lc:LayoutItem Label="Item 3">

            <TextBox />

        </lc:LayoutItem>

    </lc:LayoutGroup>

</lc:LayoutControl>

----------------------------------------------------------------------------------------------------

xmlns:lc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요