当前位置:网站首页>WPF interface layout must know basis
WPF interface layout must know basis
2022-07-29 07:16:00 【Jinan medical applet champion】
WPF Basic knowledge of interface layout
<Window x:Class="WpfApp1728.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1728"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<!--<DockPanel>
<Button Content="top Button" DockPanel.Dock="Top" Height="135" Width="370" ></Button>
</DockPanel>-->
<Grid ShowGridLines="True">
<Grid.RowDefinitions>
<!-- Line definition 3 That's ok 4 Definition of columns -->
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<!-- Column definition -->
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Content="Left Top Button" />
<!--1 Designated line Grid.Row="2" 2 Specified column Grid.Column="3" Position of control button . Make good use of additional attributes , That's enough .-->
<Button Content="Right Bottom Top Button" Grid.Row="2" Grid.Column="3" />
</Grid>
</Window>
<Window x:Class="WpfApp1728.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1728"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<!--<DockPanel>
<Button Content="top Button" DockPanel.Dock="Top" Height="135" Width="370" ></Button>
</DockPanel>-->
<Grid ShowGridLines="True">
<Grid.RowDefinitions>
<!-- Line definition 3 That's ok 4 Definition of columns -->
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<!-- Column definition -->
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Content="Left Top Button" />
<!--1 Designated line Grid.Row="2" 2 Specified column Grid.Column="3" Position of control button . Make good use of additional attributes , That's enough .-->
<Button Content="Right Bottom Top Button" Grid.Row="2" Grid.Column="3" />
<!-- Cross column design properties Grid.ColumnSpan-->
<Button Content="ColumnSpan Button" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" />
<!-- Cross line properties Grid.RowSpan-->
<Button Content="RowSpan Button" Grid.Row="0" Grid.Column="1" Grid.RowSpan="3"/>
</Grid>
</Window>
effect
Minimum width setting , The minimum compression setting is also called .
<Button Content="Left Top Button" MinWidth="80" />
Minimum width
<!-- Column definition -->
<ColumnDefinition MinWidth="100" Width="*"/>
effect
The adaptive ( To the same height as the text ) auto Code and effect
<!-- Line definition 3 That's ok 4 Definition of columns -->
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
Inside and outside the margin
<Button Content="Right Bottom Top Button" Grid.Row="2" Margin="10,10,10,10" Grid.Column="3" />
Outer margin effect
边栏推荐
- Flink real-time warehouse DWD layer (order placing multiple tables to realize join operation) template code
- Flink real-time warehouse DWD layer (transaction domain - additional purchase dimension degradation processing) template code
- 约瑟夫环问题
- pytorch的技巧记录
- gin 参数验证
- Remote invocation of microservices
- 路由中的生命周期钩子 - activated与deactivated
- 实现改变一段文字的部分颜色效果
- MutationObserver文档学习
- fillder使用
猜你喜欢
spark学习笔记(七)——sparkcore核心编程-RDD序列化/依赖关系/持久化/分区器/累加器/广播变量
Flink real time warehouse DWD layer (traffic domain) template code
CVPR2021| 基于自监督学习的多视图立体匹配 (CVPR2021)
Revolution of game assets
Cvpr2022oral special series (I): low light enhancement
Flink real-time warehouse DWD layer (transaction domain - additional purchase dimension degradation processing) template code
DM data guard cluster setup
SSH password free login - two virtual machines establish password free channel two-way trust
2022-07-28: what is the output of the following go language code? A:AA; B:AB; C:BA; D:BB。 package main import ( “fmt“ ) func main() { f
Is online legend software testing training really so black hearted? Are they all scams?
随机推荐
怎么会不喜欢呢,CICD中轻松发送邮件
Homebrew brew update doesn't respond for a long time (or stuck in updating homebrew...)
Flink实时仓库-DWD层(kafka-关联mysql的lookup join)模板代码
微服务远程调用
Win11vmware turns on the virtual machine and restarts on the blue screen and the solution that cannot be started
WPF嵌套布局案例
Interface test actual project 03: execute test cases
Ethernet interface introduction
图像加噪声与矩阵求逆
20-40K| 梅卡曼德3D视觉算法/软件/产品经理招聘
Summary of OCR optical character recognition methods
MVFuseNet:Improving End-to-End Object Detection and Motion Forecasting through Multi-View Fusion of
spark学习笔记(七)——sparkcore核心编程-RDD序列化/依赖关系/持久化/分区器/累加器/广播变量
Unity free element special effect recommendation
Vagrant box cluster processing
Improved pillar with fine grained feature for 3D object detection paper notes
路由中的生命周期钩子 - activated与deactivated
基于C语言设计的学生成绩排名系统
Student achievement ranking system based on C language design
外包干了3年,跳槽后转自动化测试工资是原来的2倍,秘诀原来是......