转:The Difference Between a LayoutTransform and a RenderTransform

简介: 来自:http://www.tuicool.com/articles/fIfm22   #770 – The Difference Between a LayoutTransform and a RenderTransform March 6, 2013 Leave a comment ...

来自:http://www.tuicool.com/articles/fIfm22

 

#770 – The Difference Between a LayoutTransform and a RenderTransform

March 6, 2013 Leave a comment

When you are transforming user interface elements using a 2D transform, you can choose one of two types of transforms.

  • A  LayoutTransform transforms elements before they are layed out by the parent panel
  • RenderTransform transforms element after they are layed out by the parent panel (but before they are rendered)

Which one you use depends on whether you want transform and then lay out (useLayoutTransform ) or to lay out and then transform (use RenderTransform ).  (Note: You could also use both types).

<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Vertical"> <Label Content="LayoutTransform"/> <Button Content="Push Me" Style="{StaticResource buttonStyle}"/> <Button Content="Push Me" Style="{StaticResource buttonStyle}"> <Button.LayoutTransform> <RotateTransform Angle="20"/> </Button.LayoutTransform> </Button> <Button Content="Push Me" Style="{StaticResource buttonStyle}"> <Button.LayoutTransform> <RotateTransform Angle="-20"/> </Button.LayoutTransform> </Button> </StackPanel> <StackPanel Orientation="Vertical"> <Label Content="RenderTransform"/> <Button Content="Push Me" Style="{StaticResource buttonStyle}"/> <Button Content="Push Me" Style="{StaticResource buttonStyle}"> <Button.RenderTransform> <RotateTransform Angle="20"/> </Button.RenderTransform> </Button> <Button Content="Push Me" Style="{StaticResource buttonStyle}"> <Button.RenderTransform> <RotateTransform Angle="-20"/> </Button.RenderTransform> </Button> </StackPanel> </StackPanel>

770-001

目录
打赏
0
0
0
0
2
分享
相关文章
一文教会你如何重装Windows10系统【过程+图解+说明】
该博客文章是一份详细的Windows 10系统重装教程,包括制作过程、图解说明和注意事项,作者分享了自己制作启动盘并成功安装系统的经验,适合初学者参考。
一文教会你如何重装Windows10系统【过程+图解+说明】
Mysql并发控制和日志
通过深入理解和应用 MySQL 的并发控制和日志管理技术,您可以显著提升数据库系统的效率和稳定性。
301 10
Linux调试
本文介绍了Linux调试、性能分析和追踪的培训资料,涵盖调试、性能分析和追踪的基础知识及常用工具。
454 6
Linux调试
AQS为什么采用双向链表
AQS为什么采用双向链表
152 10
Stream之判断(anyMatch allMatch noneMatch)
Stream之判断(anyMatch allMatch noneMatch)
184 0
阿里云服务器更换操作系统操作流程及限制说明
阿里云服务器更换操作系统流程及Windows和Linux互换限制说明
1312 1
阿里云服务器更换操作系统操作流程及限制说明
【摄像头数据处理】摄像头数据处理:使用FFmpeg合并、编码和封装视频流
【摄像头数据处理】摄像头数据处理:使用FFmpeg合并、编码和封装视频流
614 0
阿里云服务器免费试用1个月到期不用请释放否则会欠费
阿里云服务器免费试用1个月到期了怎么办?不要了就释放掉,想要继续使用可以将按量转为包年包月并续费
3555 0
阿里云服务器免费试用1个月到期不用请释放否则会欠费

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等