【问题标题】:transparent background in windows store appWindows商店应用程序中的透明背景
【发布时间】:2015-02-06 09:27:41
【问题描述】:

我正在尝试实现具有透明背景的 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">

但是背景是黑色的

【问题讨论】:

    标签: xaml windows-store


    【解决方案1】:

    您是否尝试在您的Grid 中添加Opacity

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多