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
>
查看全文
相关阅读:
Matlab norm 用法小记
C51存储器类型 MCS51单片机物理存储器区域
MATLAB 中NORM运用
Matlab norm 用法小记
C51存储器类型 MCS51单片机物理存储器区域
MATLAB 中NORM运用
poj2031
poj1039
poj3122
poj3980
原文地址:https://www.cnblogs.com/Clingingboy/p/663491.html
最新文章
paip.网站上传服务里需要做的操作流程
paip.项目文件同步分支和合并总结V2012.9.23
PAIP.ASP.NET FTP SKIPLIST
paip.网站接入QQ登录总结
paip.程序功能时间性能优化及SQL语句优化
paip.提升用户体验网站导航栏的设计
PHOTOSHOP使用总结
paip.提升用户体验显示密码控件ShowPwdController
paip.netbeans断点调试debugger console输出乱码解决方案
paip.FTP服务端及客户端的使用总结
热门文章
paip.HTML文本框INPUT无法输入的解决
paip.提升用户体验网站程序HTML,JS需要注意的地方
paip.JS的调试DOM元素的属性与事件绑定
paip.FTP服务架设选型
paip.分成系统会员推广分销系统的设计
paip. JAVA快速开发IDE与JSF技术
paip.网站上传服务里需要做的操作流程V2012.10.2
paip.提升安全性选择一个安全的加密算法
51单片机复位电路的设计
51单片机复位电路的设计
Copyright © 2011-2022 走看看