zoukankan
html css js c++ java
wpf学习笔记Canvas
继续发. Canvas为容器控件,用于定位
1.基本应用
<
Border
HorizontalAlignment
="Left"
VerticalAlignment
="Top"
BorderBrush
="Black"
BorderThickness
="2"
>
<
Canvas
Background
="LightBlue"
Width
="400"
Height
="400"
>
<
Button
Canvas.Top
="50"
>
Canvas.Top="50"
</
Button
>
<
Button
Canvas.Bottom
="50"
>
Canvas.Bottom="50"
</
Button
>
<
Button
Canvas.Left
="50"
>
Canvas.Left="50"
</
Button
>
<
Button
Canvas.Right
="50"
>
Canvas.Right="50"
</
Button
>
</
Canvas
>
</
Border
>
2.当同时设置left和right,top和bottom,以left和top为准
3.重叠深度设置
<
Canvas
>
<
Rectangle
Canvas.ZIndex
="3"
Width
="100"
Height
="100"
Canvas.Top
="100"
Canvas.Left
="100"
Fill
="blue"
/>
<
Rectangle
Canvas.ZIndex
="1"
Width
="100"
Height
="100"
Canvas.Top
="150"
Canvas.Left
="150"
Fill
="yellow"
/>
<
Rectangle
Canvas.ZIndex
="2"
Width
="100"
Height
="100"
Canvas.Top
="200"
Canvas.Left
="200"
Fill
="green"
/>
<!--
Reverse the order to illustrate z-index property
-->
<
Rectangle
Canvas.ZIndex
="1"
Width
="100"
Height
="100"
Canvas.Top
="300"
Canvas.Left
="200"
Fill
="green"
/>
<
Rectangle
Canvas.ZIndex
="3"
Width
="100"
Height
="100"
Canvas.Top
="350"
Canvas.Left
="150"
Fill
="yellow"
/>
<
Rectangle
Canvas.ZIndex
="2"
Width
="100"
Height
="100"
Canvas.Top
="400"
Canvas.Left
="100"
Fill
="blue"
/>
</
Canvas
>
查看全文
相关阅读:
gcc代码反汇编查看内存分布[1]: gcc
centos5.5 安装git
裸机代码(uboot) : clear bss
互联网协议入门
git从github下载代码
linux账户管理(centos)
jz2440: linux/arch/arm/下面的plat-和mach-
位置无关码
【漫画】什么是外部排序?【转】
快速排序 Vs. 归并排序 Vs. 堆排序——谁才是最强的排序算法
原文地址:https://www.cnblogs.com/Clingingboy/p/663491.html
最新文章
Linux系统调优——网络(四)
Linux系统调优——磁盘I/O(三)
Linux系统调优——Memory内存(二)
Linux系统调优——CPU(一)
C# 线程(六):定时器
C# 线程(五):线程池
C# 线程(四):生产者和消费者
C# 线程(三):如何操纵一个线程
C# 线程(二):关于线程的相关概念
C# 线程(一)
热门文章
sql server日期时间函数
style不同取值对应的日期、时间格式
FormsAuthentication.HashPasswordForStoringInConfigFile 方法 之研究
SQL:with ties
SQL collate
SQL Server 存储过程
.NET中的三种接口实现方式
“System.Data.OracleClient.OracleConnection”已过时
笔记一
gcc代码反汇编查看内存分布[2]: arm-linux-gcc
Copyright © 2011-2022 走看看