当前位置:网站首页>Introduction to C # WPF layout control layoutcontrol
Introduction to C # WPF layout control layoutcontrol
2022-06-09 23:44:00 【User 9127601】
Dev Study address
Document address :https://docs.devexpress.com/
wpf:https://docs.devexpress.com/WPF/7875/wpf-controls
winform:https://docs.devexpress.com/WindowsForms/7874/winforms-controls
asp.NET: https://docs.devexpress.com/AspNet/7873/aspnet-webforms-controls
blazor :https://docs.devexpress.com/Blazor/400725/blazor-components
summary
LayoutControl It's a project container , Arrange these items in a row or column .
Can be LayoutGroup Add container as sub container to LayoutControl.LayoutGroup Containers allow you to put their items side by side ( Vertical or horizontal ) Or arrange as tabs .LayoutGroup It can include other LayoutGroup Object as a child object , Arrange their items in different directions . This allows the creation of non-linear layouts :
Use LayoutControl The biggest benefit of , It will automatically maintain a consistent layout of child controls . Even if you resize the window 、 Add or remove controls , Or change the font setting of the control , Controls do not overlap .( If you manually adjust the margin property of the control , Controls may overlap ).
In addition to consistent layout functions ,LayoutControl It also provides the following functions :
Use LayoutItem Wrappers are automatically aligned and embedded LayoutControl Control for . Automatically align the labels associated with these controls based on their left edges . For more information , See aligning the contents of layout items .
Resize children and groups with built-in resizers .
Align items in a group or layout control . You can align an item with any edge of its parent control 、 Center or stretch . When the size of the parent changes , This item will adjust its position accordingly . For more information , See in LayoutGroup and LayoutControl Object .
Customize the layout in custom mode . In this mode , The end user can modify the layout of the project by dragging and dropping , And change the alignment of controls in the group . For more information , See custom mode .
Groups can be rendered as tabs or containers GroupBox object ( A container with a title ).
LayoutControl The elements of
LayoutControl Accept any type of item . However , The following project types are the most typical :
-. LayoutGroup. It represents a container control , Can be side by side ( In a row or column ) Or display its child controls in the form of tabs . You can use LayoutGroup.View Property specifies the visual style of the layout group :
LayoutGroupView.GroupBox
according to LayoutGroup, The children in this group are arranged in a column or row . Direction attribute .
In this mode , Group title (LayoutGroup.header) And borders are visible . Besides , You can also use LayoutGroup Enable group folding .
-. LayoutGroupView.Group:
This group appears as a container without appearance , No borders and titles . Same as the previous visual style , The project is based on LayoutGroup Arrange in a column or row . Direction attribute .
-. LayoutGroupView.Tabs:
The group appears as a tabbed Group , Where direct children are represented as tabs . By combining multiple items into a single layout group , And add the group as a child to the tab group , You can display multiple items in a single tab .
To specify a tab title for a child , Please use the following properties . If LayoutGroup Is a child of a tabbed group , Please use the... Of this group LayoutGroup. Title Properties . For other projects , Please use LayoutControl.TabHeader Additional attributes .
LayoutControl The name of the element that will be in the inactive tab in the tab group IsEnabled Property is set to False. After selecting a previously inactive tab ,iEnabled Property values will be restored .
LayoutItem: This is an object that displays the label of the control :
It also has the function of automatic alignment of controls within and between groups . For more information , See layout items and groups .
Items Arrangement
stay LayoutControl Lieutenant general LayoutGroups As a child, you can realize composite layout . Consider in LayoutControl The following layout of the items arranged in :
To create the layout shown above , Group items to be arranged in the same direction into the same group . then , Combine these into other groups , wait . To understand how this layout is built , Let's make the group border and title visible :
ad locum , These project combinations are as follows :
LayoutControl Arrange groups vertically 1 And groups 5.
The first group is arranged horizontally, the second group and a label group .
The first 2 The group is arranged vertically 1 Xiang and di 3 Group .
The first 3 The group is arranged horizontally 2 Xiang and di 4 Group .
The fourth group arranges two items vertically .
The tab group contains two tabs ( tab 1 And tabs 2). Each tab contains specific items . for example , Tabs represented by layout groups 1 Arrange items vertically 5 And projects 6.
The fifth group arranges three items horizontally .
The final statement
This article is translated from :https://docs.devexpress.com/WPF/8147/controls-and-libraries/layout-management/tile-and-layout/layout-and-data-layout-controls/layout-control
边栏推荐
- Oracle中如何记录访问数据库的登录信息?
- Huangxiting: psychological research should follow the path of the Chinese people, and should do psychological research with Chinese characteristics
- SPSS主成分分析
- Opencv architecture
- How does uni app build applets?
- 2022 operation of simulated examination platform for examination question bank of pillar special operation certificate for metal and nonmetal mines
- Is Hebei Hengyin futures a regular platform? Is it safe?
- 15 张图带你深入理解浮点数
- I've taken it. The MySQL table has 500W rows. Is there anyone who doesn't partition?
- Online JSON to CSV tool
猜你喜欢

又一重磅內容|海外現金貸產品形態及風控措施

Another important content - Overseas cash loan product form and risk control measures

DDD驱动领域设计学习笔记

辐射亮度与表观反射率的转换

Server operation and maintenance environment security system (Part 2)

Manual single precision floating point type

exness:推特表示继续向马斯克分享数据,并在7月底或8月初进行股东投票

What is liquidity pledge? What is a farm pledge?

“当你不再是程序员,很多事会脱离掌控”—— 对话全球最大独立开源公司SUSE CTO
![[volume guide] mendeley document management tool tutorial](/img/21/06649cfcf4d1c42f5c12dc372b519d.png)
[volume guide] mendeley document management tool tutorial
随机推荐
从零开始实现lmax-Disruptor队列(二)多消费者、消费者组间消费依赖原理解析
Easyrecovery15 mobile computer full function data recovery software
什么是分布式软件系统
JG file upload code and export Excel
ArcMap解决几何错误
C# WPF后台动态添加控件(经典)
双塔模型-语义索引策略 [In-batch Negatives]
Swift GCD Notify after concurrent execution Lock barrier
模型部署简述
Microsoft Word tutorial "4", how to apply styles and themes in word?
Game installation, downloading and updating no unveils the mystery of future games
How to record the login information of accessing the database in oracle?
PHP学习需要掌握的基础与入门知识
哨兵3(Sentinel-3)数据简介
Question bank and answers of 2022 metal and nonmetal mine blasting examination
CSRF/XSRF简介
Openharmony risc-v lightweight system porting - shared with w800 porting
Difference between stacked cable optical module and ordinary optical module
String-4-242. 有效的字母异位词
Design the storage scheme of examination papers in the management system for tens of millions of students