DevExpress控件使用交流,DevExpress中国社区Dev联系电话 联系电话:023-68661681

DevExpress Windows 8 XAML常用示例一:创建表单布局

来源:本站原创   发布时间:2013-01-04   浏览:4363次

DevExpress Windows 8 XAML中的表单运用嵌套的 LayoutGroups 创建布局,各个项的布局由 LayoutGroupBase.Orientation 属性控制:

示例代码如下:

xmlns:Layout="using:DevExpress.UI.Xaml.Layout" 
xmlns:Editors="using:DevExpress.UI.Xaml.Editors"

<Layout:LayoutControl  Width="550">
    <Layout:LayoutGroup Orientation="Vertical" Header="Personal Information" AllowExpand="True">

        <Layout:LayoutGroup Orientation="Horizontal">
            <Layout:LayoutGroup Orientation="Vertical">
                <Layout:LayoutItem Header="Title:"><Editors:TextEdit/></Layout:LayoutItem>
                <Layout:LayoutItem Header="First name:"><Editors:TextEdit/></Layout:LayoutItem>
                <Layout:LayoutItem Header="Last name:"><Editors:TextEdit/></Layout:LayoutItem>
            </Layout:LayoutGroup>
            <Layout:LayoutItem HeaderPosition="Top" Header="Notes:"><Editors:TextEdit/></Layout:LayoutItem>
        </Layout:LayoutGroup>

        <Layout:LayoutGroup Orientation="Horizontal">
            <Layout:LayoutItem Header="Phone:"><Editors:TextEdit/></Layout:LayoutItem>
            <Layout:LayoutItem Header="E-mail:"><Editors:TextEdit/></Layout:LayoutItem>
            <Layout:LayoutItem Header="Skype:"><Editors:TextEdit/></Layout:LayoutItem>
        </Layout:LayoutGroup>
    </Layout:LayoutGroup>
</Layout:LayoutControl>

本站文章除注明转载外,均为本站原创或翻译
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:DevExpress控件中文网 [https://www.devexpresscn.com/]
本文地址:https://www.devexpresscn.com/post/452.html
扫码咨询
电话咨询
023-68661681
返回
顶部