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
>
查看全文
相关阅读:
List
迭代器Iterator
Collection方法
Collection体系
Date DateFormat SimpleDateFormat
Calendar
BigInteger & BigDecimal
System类
正则2 -- pattern和Matcher
关于团队组成
原文地址:https://www.cnblogs.com/Clingingboy/p/663491.html
最新文章
4章-项目整合管理-day3
OTDR常见测试曲线知识分析
关于光网络测试仪的知识
1-3章-day2
不同运营商之间是如何实现互相访问的
PMP中最重要的十五矩阵-day1
为什么说在国内考CISP比CISSP要好?
网络规划设计师备考经历三篇
LNMP环境部署中,编译过程告警&主机访问不了虚拟机nginx服务
JSONObject JSONArray
热门文章
Myeclipse 反编译
<input type="hidden" value="....." />
css 实现 ul li 的显示与隐藏
jquery 标签的任意属性
(总结)struts2中 值栈,action属性,request属性,session属性 设置域获取
request 和 session 获取方法
struts2 标签获取后台对象值 !!!
值栈
<s:property value=""/> 获取属性时的各种方式
Vector
Copyright © 2011-2022 走看看