问题描述
限时送ChatGPT账号..我对 WP
应用程序很陌生,不知道如何在 app.xaml
文件中设置 back-ground
图像以用于Windows Phone 8
应用程序中的整个应用程序.到目前为止,我已经在它上面放置了一些 controls
但未能设置背景图像.我看过一些材料,但没有奏效.任何帮助将不胜感激!
I am very new to WP
apps and don't know how to set the back-ground
image in app.xaml
file for whole application in Windows Phone 8
app. Up-till now, i have placed some controls
over it but fail to set background image. I have seen some material but did not work. Any help will be appreciated !
推荐答案
您可以添加一个以 Image 作为背景的 Common Grid Style.并将其放置在 App.xaml.Resources 下.
You can add a Common Grid Style which uses Image as background.And place it under App.xaml.Resources.
<Application.Resources>
<Style x:Key="LayoutGridStyle" TargetType="Grid">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="/Assets/bgImage.jpg"/>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
并将其用于页面的根网格.
And use it for the Root grid of your page.
<Grid x:Name="LayoutRoot" Style="{StaticResource LayoutGridStyle}">
//Content goes here
</Grid>
这篇关于如何在 Windows Phone 8 中设置背景图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论