I have a piece of AutoHotKey script that allows me to set transparency on an active window but it does not work with WPF application like Powershell ISE.
Is there a way to do that?
EDIT: As is stated in the question I need to do that on a running WPF app like Powershell ISE.
Set this in Window element
AllowsTransparency="True" WindowStyle="None" Background="Transparent"
Hi WPF is based on Direct3D, and is a bit different from win32 and forms which is based on GDI/GDI+.
In WPF you do this in your xaml(see example by maximus) or create your own window style.
There is a post here on how you should do this in WPF.
Another slightly related question.
A style :
<Style TargetType="Window" x:Key="TransparentWindowStyle">
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="AllowsTransparency=" Value="True"/>
<Setter Property="Background" Value="Transparent"/>
</Style>
Skip the x:Key and it will be applied to all windows or you have to place in app.xaml or a place where it is shared, and apply it to the window. A bit overkill for just 3 properties, but handy if you are going to do other changes, that should be applied to multiple windows.
Hope it helps,
Stian
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With