Im using a WPF Window in the WindowsStyle='none'
;
With this I create my own custom window by giving the 'root' grid
(the highest in the XAML-tree) a Margin of 20px
and a DropShadow
. The window itself is transparant, the grid has a white background.
When I set the WindowsStyle.Maximized
, I remove the extra Margin
and the DropShadow
. When I set WindowsStyle.Normal
I add the extra Margin
and the DropShadow
again.
But when I snap my WPF window in Windows 10 to a corner or side of my screen. It snaps but I dont get an Window.StateChanged
event.
My question is: Is there anyway to figure out when my Window has snapped in Windows and when it Unsnapped?