You don't need to use P/Invoke to implement such behavior. It's pretty bad thing to use P/Invoke without some really compelling reason. You seriously risk platform compatibility, especially for future, when — who knows? — WPF might be implemented for many other (non-Microsoft) platforms, as it happened to
System.Windows.Forms
for Mono. Even if you don't care about it, it increase the change of other incompatibilities or just bugs.
You layout should be fluid enough and work for nearly all window sized, even if you don't maximize. If you want to dock something, there are the dock panels. Please see:
http://wpftutorial.net/DockPanel.html[
^].
There are many other layout features, so the problem of keeping proper layout while the window changes the size is totally out of scope. This is not a problem at all. If it's not the case in your design, it's wrong from the very beginning. Note that you even don't need to write any code to handle resize events, but this is another possibility. You just don't need it for your purpose. This is about one topic: "how to forget P/Invoke and start programming". By learning layout and other basics.
Good luck,
—SA