这是取-6ren">
gpt4 book ai didi

alignment - Windows Phone "Alignment image"- 为什么?

转载 作者:行者123 更新时间:2023-12-05 01:13:06 29 4
gpt4 key购买 nike

我正在为 Windows Phone 8 开发,我已经设计了我的应用程序,我注意到有一个“分配网格”代码,默认情况下可以在新项目中取消注释。

看看下面的文件中的描述:

<!--Uncomment to see an alignment grid to help ensure your controls are
aligned on common boundaries. The image has a top margin of -32px to
account for the System Tray. Set this to 0 (or remove the margin altogether)
if the System Tray is hidden.

Before shipping remove this XAML and the image itself.-->
<!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->

这是取消注释时显示的背景图像:

Alignment grid

我对此感到困惑,为什么图像决定了“共同边界”?当然边界是在开发环境中确定的,IE是手机图像的边界?即使在上面显示的图像上,默认的“我的应用程序”文本也不适合“对齐图像”。所以他们不遵守他们自己的对齐规则?

我应该从这些信息中得到什么?通过将所有内容保持在这些范围内,我将失去一半的屏幕空间!

为什么我必须在这些边界内对齐我的控件,它们最终会不会显示出来?我认为 Windows Phone 的分辨率是一样的?

编辑:

我希望在我的应用程序的最顶部放置一个通知按钮和当前登录用户名的指示,如下所示:

Menu top showing username and notifications

我可以将这些放在网格内的唯一方法是,如果我让它们下垂得很远,它看起来不会像我想要的那样。

我是否应该将所有内容都放在网格图像中,否则我是否会在实现过程中遇到麻烦?

最佳答案

网格用作指导方针,使您的应用程序看起来美观。如果您的文本一直延伸到屏幕边缘,您的应用程序将看起来很难看。框之间的网格用于对齐应用程序内的元素。您不希望所有元素都粘在一起,它们会看起来很丑。 Windows Phone 开发非常注重设计。

希望有所帮助!

歌曲

关于alignment - Windows Phone "Alignment image"- 为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14176661/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com