WPF Window with transparent background containing opaque controls


This question already has an answer here:


Instead of setting the opacity of the window, set its background's opacity:

<Window x:Class="WpfApplication3.MainWindow"
        Title="MainWindow" Height="350" Width="525"
        AllowsTransparency="True" WindowStyle="None">
        <SolidColorBrush Opacity="0.5" Color="White"/>
        <Button Width="200" Height="50">button</Button>

If you create a style like this:

    <Style TargetType="Button" x:Key="WindowButtons">
        <Setter Property="Opacity" Value="1"/>           

Then you can reference those in the XAML for your button like this:

<Button Style="{StaticResource WindowButtons}">Tony</Button>

And it should no longer inherit it's opacity from its parent.

Above effect can also be achieved by setting Opacity from designer from 100% to 60%(as required).

Need Your Help

Maven create jar file with both .class and .java files

java maven gwt

I'm looking for a way to create jar files containing both .class and .java files for GWT modules. Anyone knows how that could be achieved?