WPF学习——布局

<Window x:Class=“LayOut.border”

xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation”

xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml”

Title=“border” Height=“300” Width=“300”>

二、使用WarpPanel布局

WrapPanel面板在空间中以一次一行或一列的方式布置控件,默认从左往右排列,再在下一行排列。可通过设置WrapPanel.Oritentation属性设置排列方向(Horizontal和Vertical)

<Window x:Class=“WarpPanel.MainWindow”

xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation”

xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml”

Title=“MainWindow” Height=“210” Width=“433”>

Top Button

Tall Button

Bottom Button

Stretch Button

Center Button

三、使用DockPanel布局

<Window x:Class=“DockPanel.MainWindow”

xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation”

xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml”

Title=“MainWindow” Height=“235” Width=“328”>

Remaining Space

四、StackPanel、WrapPanel、DockPanel嵌套布局

<Window x:Class=“Nesting.MainWindow”

xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation”

xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml”

Title=“MainWindow” Height=“266” Width=“407”>

OK

Cancel

五、使用Grid布局

<Window x:Class=“Grid.MainWindow”

xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation”

xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml”

Title=“MainWindow” Height=“173” Width=“353”>

<Grid.RowDefinitions>

</Grid.RowDefinitions>

<Grid.ColumnDefinitions>

</Grid.ColumnDefinitions>

(0,0)

<GridSplitter Grid.Row=“0” Grid.Column=“2” Width=“3”

VerticalAlignment=“Stretch” HorizontalAlignment=“Center” RenderTransformOrigin=“0.5,0.5” Margin=“0,0,83,0”>

六、使用UniformGrid布局

<Window x:Class=“Grid.MainWindow”

xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation”

xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml”

Title=“MainWindow” Height=“173” Width=“353”>

<Grid.RowDefinitions>

</Grid.RowDefinitions>

<Grid.ColumnDefinitions>

</Grid.ColumnDefinitions>

(0,0)

<GridSplitter Grid.Row=“0” Grid.Column=“2” Width=“3”

VerticalAlignment=“Stretch” HorizontalAlignment=“Center” RenderTransformOrigin=“0.5,0.5” Margin=“0,0,83,0”>

七、使用Canvas面板进行基于坐标的布局

<Window x:Class=“Canvas.MainWindow”

xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation”

xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml”

Title=“MainWindow” Height=“234” Width=“327”>

Z顺序

如果Canvas面板中有多个相互重叠的元素,可通过设置Canvas.ZIndex附加属性来控制他们的层叠的方式,添加的所有元素通常都有相同的ZIndex值,都为0

总结

阿里伤透我心,疯狂复习刷题,终于喜提offer 哈哈~好啦,不闲扯了

image

1、JAVA面试核心知识整理(PDF):包含JVMJAVA集合JAVA多线程并发,JAVA基础,Spring原理微服务,Netty与RPC,网络,日志,ZookeeperKafkaRabbitMQ,Hbase,MongoDB,Cassandra,设计模式负载均衡数据库一致性哈希JAVA算法数据结构,加密算法,分布式缓存,Hadoop,Spark,Storm,YARN,机器学习,云计算共30个章节。

image

2、Redis学习笔记及学习思维脑图

image

3、数据面试必备20题+数据库性能优化的21个最佳实践

image

keeper**,KafkaRabbitMQ,Hbase,MongoDB,Cassandra,设计模式负载均衡数据库一致性哈希JAVA算法数据结构,加密算法,分布式缓存,Hadoop,Spark,Storm,YARN,机器学习,云计算共30个章节。

[外链图片转存中…(img-rVwtx7tu-1714481186043)]

2、Redis学习笔记及学习思维脑图

[外链图片转存中…(img-QZqjk1ZH-1714481186043)]

3、数据面试必备20题+数据库性能优化的21个最佳实践

[外链图片转存中…(img-mwyjfxXN-1714481186043)]

本文已被CODING开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码】收录

  • 26
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值