繁体   English   中英

适用于Windows Phone的Silverlight AutoSize和Visual Studio 2010

[英]Silverlight AutoSize and Visual Studio 2010 for Windows Phone

我有设计师使用Blend设计Windows Phone页面。 它设置了d:DesignHeight和d:DesignWidth。

我将Visual Studio 2010 Express用于Windows Phone。 现在,如果我在DesignMode中打开任何.xaml文件,它将重置DesignHeight和Width。 确实很烦人,因为我必须在签入对SourceControl的更改之前手动更改这些值。

看到了这个WPF UserControl设计时间大小,但是在每一页中做到这一点对我来说都是愚蠢的。

希望VS有一个开关,我不知道。

有什么想法吗?

更新我有以下内容:

SupportedOrientations="Landscape"  Orientation="Landscape" 
shell:SystemTray.IsVisible="True" d:DesignHeight="800" d:DesignWidth="480"> 

当我在设计模式下查看时,它变为

d:DesignHeight="480" d:DesignWidth="782">

Windows Phone具有固定的页面大小(480x800像素)

在设计页面时,设计者可以通过查看页面的方向和SystemTray的可见性来确定设计者中合适的尺寸:

SupportedOrientations="Portrait"  Orientation="Portrait"
shell:SystemTray.IsVisible="False">

我的猜测是,因为您只能设计全屏页面,所以设计人员会不断替换高度和宽度的自定义设置值。

创建用户控件(而不是页面!)时,可以随意更改高度和宽度。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM