The new RelativePanel implements a style of layout that is defined by the relationships between its child elements. It's intended for use in creating app layouts that can adapt to changes in screen resolution. TheRelativePanel eases the process of rearranging elements by defining relationships between elements, which allows you to build more dynamic UI without using nested layouts.

In the following example, blueButton will appear to the right of textBox1 regardless of changes in orientation or layout, and orangeButton will appear immediately below, and aligned with, blueButton—even as the width of textBox1 changes as text is typed into it. It would previously have required rows and columns in aGrid to achieve this effect, but now it can be done using far less markup.

 
<RelativePanel>
<TextBox x:Name="textBox1" Text="textbox" Margin="5"/>
<Button x:Name="blueButton" Margin="5" Background="LightBlue" Content="ButtonRight" RelativePanel.RightOf="textBox1"/>
<Button x:Name="orangeButton" Margin="5" Background="Orange" Content="ButtonBelow" RelativePanel.RightOf="textBox1" RelativePanel.Below="blueButton"/>
</RelativePanel>

最新文章

  1. Angularjs路由需要了解的那点事
  2. 用django实现一个微信图灵机器人
  3. Android String操作
  4. 【转】 SQL 2005 try catch
  5. Java RESTful Web Service相关概念
  6. com.service.impl
  7. 李洪强漫谈iOS开发[C语言-023]-取余数运算符
  8. Zendframework连接两个或多个数据库的实现
  9. Java 并发专题 : Semaphore 实现 互斥 与 连接池
  10. 在标记的HREF属性中javascript:alert(this.innerHTML)会怎么样?
  11. 从DDD开始说起
  12. Dynamics CRM2016 新功能之从CRM APP通过电子邮件发送页面链接
  13. Java的序列化和反序列化
  14. Python中collections模块
  15. Flask简介&amp;入门
  16. C# 绘制圆角矩形
  17. (1.9)SQL优化——mysql导入导出优化
  18. 添加了unimportant 之后,需要调整的参数
  19. synchronized(七)
  20. 九:python 对象类型详解五:元组

热门文章

  1. PHP-fpm启动时 出现 PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) &#39;fileinfo.so&#39; in Unknown on line 0
  2. hadoop学习day3 mapreduce笔记
  3. django-redis缓存
  4. web.xml中配置spring.xml的三种方式
  5. javascript中defer的作用
  6. 用JDK自带的包来解析XML文件(DOM+xpath)
  7. 在 springboot 中如何整合 shiro 应用 ?
  8. archlinux错误:无法提交处理 (无效或已损坏的软件包)
  9. testng的xml文件说明(TestNG DTD)
  10. 微信小程序-滑动视图注意事项