博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
windows 10 自适应布局
阅读量:6218 次
发布时间:2019-06-21

本文共 2008 字,大约阅读时间需要 6 分钟。

https://msdn.microsoft.com/library/windows/apps/dn894631.aspx

Use visual state triggers to build UI that can adapt to available screen space

Your UI may need to adapt to changes in window size. Adaptive visual states allows you to change the visual state in response to changes in the size of the window.

StateTriggers define a threshold at which a visual state is activated, which then sets layout properties as appropriate for the window size that triggered the state change.

In the following example, when the window size is 720 pixels or more in width the best-rated games are displayed to the right of the top free games panel and aligned with the top of the top free games panel. The visual state named wideView is triggered when the window is a minimum of 720 pixels wide, which then arranges the Best-rated games panel to appear to the right of, and aligned with the top of, the Top free games panel.

Visual state trigger example. Wide view

When the window is less than 720 pixels, the narrowView visual state is triggered because the wideViewtrigger is no longer satisfied and so no longer in effect. The narrowView visual state positions the Best-rated games panel below, and aligned with the left of, the Top paid games panel:

Visual state trigger example. Narrow view

Here is the XAML for the visual state triggers described above. The definition of the panels, alluded to by "..." below, has been removed for brevity.

XAML
 
...

 

转载于:https://www.cnblogs.com/gisbeginner/p/4565531.html

你可能感兴趣的文章
P类问题、NP类问题与NPC类问题
查看>>
Nginx高性能服务器安装、配置、运维 (6) —— Nginx日志及日志分割
查看>>
流程控制语句
查看>>
用代理抓取微信文章
查看>>
category的概念
查看>>
php生成N个不重复的随机数实例
查看>>
生物结构变异分析软件meerkat 0.189使用笔记(一)
查看>>
Java中成员变量的隐藏和方法的重写
查看>>
Java 对简单字符的编码
查看>>
设置访问URL不要项目名二级目录
查看>>
使用 Redis 实现 Session 共享
查看>>
Idea改项目名
查看>>
设计模式-享元模式(13)
查看>>
WPF入门教程系列六——布局介绍与Canvas
查看>>
Io流的概述
查看>>
奇葩概念
查看>>
【剑道】 他人技法心得整理
查看>>
MYSQL分页存储过程及事务处理
查看>>
一小时入门PHP
查看>>
【设计模式系列】结构型模式之Flyweight 模式
查看>>