积极答复者
Win8各种设备不同分辨率怎么保持图标、图片及字体的大小与全局的比例

问题
-
例如,设置了图片的长宽或者Grid的长宽,这样在小屏幕的设备上,图片显示的很大
<Grid x:Name="GridTabCurrent" Width="65" Height="267" Opacity="0">
还有设置了FontSize,在小屏幕上也显示的很大
<Grid.Background>
<ImageBrush ImageSource="ms-appx:///Assets/detail/current.png" />
</Grid.Background>
</Grid>
- 已编辑 Venlentinee 2013年5月3日 12:09
答案
-
Hi,
商店应用中大量的控件都被设计的可以自己适应不同的分辨率,但是不同的资源(比如图片,图标)需要适应不同的分辨率,这个是使用资源系统的,具体的做法可以看看:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465362.aspx
让布局适应不同的分辨率的话,可以看看这篇文章,里面提供了多种方法以及不同情况下的解决方案:
http://msdn.microsoft.com/en-us/library/windows/apps/hh780612.aspx#testing_your_app_layout
Aaron
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- 已标记为答案 Aaron XueModerator 2013年5月9日 8:03
全部回复
-
Hi,
商店应用中大量的控件都被设计的可以自己适应不同的分辨率,但是不同的资源(比如图片,图标)需要适应不同的分辨率,这个是使用资源系统的,具体的做法可以看看:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465362.aspx
让布局适应不同的分辨率的话,可以看看这篇文章,里面提供了多种方法以及不同情况下的解决方案:
http://msdn.microsoft.com/en-us/library/windows/apps/hh780612.aspx#testing_your_app_layout
Aaron
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- 已标记为答案 Aaron XueModerator 2013年5月9日 8:03