I have a WPF window declared like this
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="MyWindow"
Height="800" Width="200"
BorderThickness="0"
WindowStyle="None"
AllowsTransparency="False"
ResizeMode="CanResizeWithGrip"
Topmost="True"
Background="#fff59d"
ShowInTaskbar="False">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="0" ResizeBorderThickness="5" />
</WindowChrome.WindowChrome>
</Window>
In this window there are a bunch of aligned buttons, making the window a nice tool bar that sits on top of the other windows.
Now I'd like to snap it to a screen edge (bottom, left, top, right) so that the working area of the screen is reduced by the window's area. Just like what happens with the Windows taskbar: the area covered by the taskbar is not used when other windows are maximized and the taskbar is always on top.
Any help is much appreciated !
EDIT
I'm adding an image to better explain my question:
I'm interested in position my WPF window on an edge so that the area of the window is forbidden to other windows.