brian.shapiro said:
Being able to dock to the screen edge is not a native capability of either Windows Forms or WPF, so what you have to do in either case is make a call to the system API (which will be the shell32.dll library in this case). A window thats docked to the edge of the screen, like the taskbar or sidebar, is called in Windows documentation an AppBar or Application Desktop Toolbar.

There's not a tutorial on the web for WPF, so I'll first point you to two for Windows Forms:
http://www.codeproject.com/KB/dotnet/AppBar.aspx
http://www.codeproject.com/KB/shell/csdoesshell3.aspx

The most important difference in WPF is that instead of handling Windows Forms events for windows, like OnSizeChanged, you're going to need to use WPF equivalent events. You're also going to need to make use of the System.Windows.Interop library, which allows you to use the system API with your WPF application.

There may or may not be a library thats pre-written for you in managed code. I'm currently working on a project that uses AppBar and  a Glass background, but I'd have to work on it more and clean up the code before I could give you the source.



I'd be interested in seeing the source code too, when you get it cleaned up.  I've been able to specify the location on the screen that the app must start at, but it's nothing even remotley close to a docking function...