简体   繁体   English

Windows 8(Metro App)中的透明度

[英]Transparency in Windows 8 (Metro App)

I am trying to make transparent Grid but Text(or something else) on it not transparent. 我试图制作透明的网格,但文字(或其他东西)不透明。 What i am supposed to do? 我该怎么办? And sorry for my English. 抱歉我的英语。

Per an older question, the trick to allow a child element to override the opacity is to use a brush on the parent's background instead: 根据较旧的问题,允许子元素覆盖不透明度的技巧是在父背景上使用画笔:

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

You can find more here: How do you override the opacity of a parent control in WPF? 你可以在这里找到更多: 如何覆盖WPF中父控件的不透明度?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM