I tried SetWindowCompositionAttribute
solution, and it worked well, but no shadows.
I tried combine blurbehind + apply shadow on window with DropShadow for WPF Borderless Window but here i got issue with unfocus/focus window lost transparancy.
Is it possible to make borderless window with blurbehind + shadow (and some close/min/max)?
Example: AMD Radeon Settings. Is it wpf? Or custom c++ solution.
Asked
Active
Viewed 1,452 times
1
2 Answers
3
var accent = new AccentPolicy()
{
AccentState = AccentState.ACCENT_ENABLE_BLURBEHIND,
AccentFlags = 0x20 | 0x40 | 0x80 | 0x100,
};
the set Value of AccentFlags will give your window a dropshadow effect like menu and calendar of Windows 10 does

Alex Essilfie
- 12,339
- 9
- 70
- 108

Goose Bomb
- 46
- 1
-
I will try it. Is it possible to set custom shadow (color etc)? – send0xx Dec 12 '16 at 09:37
-
Yes. It's working. Can i make glossy panels like – send0xx Dec 16 '16 at 10:04
-
@ionmike Actually I'm referring from this [link]( http://pastebin.com/22nueJdZ ) you can see the AccentFlags values is correspond to the four edge borders. Since this method using the native API of windows 10,I don't think there's much detailed effect tweaks could be done. However you can adjust the transparency and color of your application window to get a similar look as the – Goose Bomb Dec 16 '16 at 16:29
0
I know how to do this in XAML, it's probably best to have all visual code in XAMl and logical code in C#.
Code:
//Set BorderThickness to 0 for no boreder //play with DropDownShadowEffect
<Border BorderBrush="color" BorderThickness="0" >
<Border.Effect>
<DropShadowEffect BlurRadius="10" Color="black" Direction="235" Opacity=".3" RenderingBias="Performance" ShadowDepth="4" />
</Border.Effect>
</Border>
hope that is what you are looking for

JohnChris
- 1,360
- 15
- 29
-
I dont think it will work. Becouse you are trying to apply shadow to 'in window area' and can (or will) be blurred. There i'm trying to do native blurbehind+shadow on window (dwm). – send0xx Nov 22 '16 at 10:54
-
1@ionmike, ah yes, for what you want you probably would have to read up on control templates, as these allow you to change almost anything control wise, not sure about the actual window - sorry – JohnChris Nov 22 '16 at 10:57