Windows商店应用程序中的透明背景

时间:2014-12-08 16:52:31

标签: xaml windows-store

我正在尝试使用透明背景实现Windows应用商店应用。 在我的xaml中我写道:

<Page
x:Class="App4.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App4"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" Background="Transparent">

但背景为黑色

1 个答案:

答案 0 :(得分:1)

您是否尝试在Opacity中添加Grid

<Grid>
<Grid.Background>
     <SolidColorBrush Color="Black" Opacity="0.5"/>
</Grid.Background>
</Grid>

参考:How do you override the opacity of a parent control in WPF?