【问题标题】:Silverlight AutoSize and Visual Studio 2010 for Windows PhoneSilverlight AutoSize 和 Visual Studio 2010 for Windows Phone
【发布时间】:2011-12-19 05:23:02
【问题描述】:

我有设计师使用 Blend 来设计 windows phone 页面。它具有 d:DesignHeight 和 d:DesignWidth 集。

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

看到这个WPF UserControl Design Time Size 但是在每一页都这样做对我来说是愚蠢的。

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

有什么想法吗?

更新 我有以下内容:

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

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

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

【问题讨论】:

    标签: silverlight visual-studio-2010 silverlight-4.0 expression-blend windows-phone-7.1


    【解决方案1】:

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

    当您设计页面时,设计师通过查看页面的方向和 SystemTray 的可见性来确定设计器中的适当大小:

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

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

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

    【讨论】:

    • 检查我更新的问题。根据您的解释,我认为是因为我的横向模式导致了这种情况。但在那种情况下,设计师也应该看到这一点,对吧?我会根据你的解释尝试一些事情。谢谢。
    • 是的,这是使您能够在设计器中以两个方向设计/查看页面的预期行为。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多