0
我试图设置为我的应用程序的背景图像,现在我知道如何设置背景图像本地使用如何在Windows Store应用程序中将应用程序的背景全局设置为图像?
<Grid> <Grid.Background> <ImageBrush ImageSource="/Assets/Background.png"/> </Grid.Background> </Grid>
我怎样才能做到这一点从全球来看,
我试图设置为我的应用程序的背景图像,现在我知道如何设置背景图像本地使用如何在Windows Store应用程序中将应用程序的背景全局设置为图像?
<Grid> <Grid.Background> <ImageBrush ImageSource="/Assets/Background.png"/> </Grid.Background> </Grid>
我怎样才能做到这一点从全球来看,
有有2种方法来做到这一点: 1.添加样式到你的资源没有名字,所以它适用于该类型的每一个元素:
<Page.Resources>
<Style TargetType="Grid">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="/Assets/SplashScreen.png"/>
</Setter.Value>
</Setter>
</Style>
</Page.Resources>
2.增添风格的名字,并将其应用如您指定的文件StandardStyles.xaml重点=“LayoutRootStyle”,它很好,谢谢很多工作:当你需要
<Page.Resources>
<Style x:Key="ImageStyle" TargetType="Grid">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="/Assets/SplashScreen.png"/>
</Setter.Value>
</Setter>
</Style>
</Page.Resources>
<Grid Style="{StaticResource ImageStyle}">
</Grid>
我改变在x“背景”属性 – Justice 2013-03-03 12:04:44