views:

975

answers:

3

I'm looking for solution to add snapping/sticky windows functionallity (winamp-like) to existing WPF application. Same thing as it was asked here, just I need it for WPF.

It doesn't have to have docking function, just to snap to border of other windows inside same application and edge of screen (including taskbar) if possible. Preferably open source solution.

Thanks


I have moved m1k4 solution here since it's not longer available at posted location in answer.

A: 

The WPF Docking Library may provide some of what you are looking for, but I'm unsure if it works on the entire screen or just on your application window.

ravuya
I have tried project demo. Snapping windows functionality does not work between windows inside application. Just docking for windows on main window.
Andrija
+3  A: 

HuddledMasses.org has very nice example for snapping to screen edges (nice opensource framework underneath also)

HuddledMasses - WPF windows that snap to screen edges

However, it lacks snapping to other windows. There is another solution on CodeProject. It's Windows Forms sticky windows. There you can find implementation for nearest window detection and snapping, which you/me/orsomebodyelse should implement in WPF manner.

Code Project - Sticky windows


Edit: I've created solution based on the text above

WPF Sticky Windows Solution Download Link

m1k4
That's it! Thanks :)
Andrija
+2  A: 

Here my project that make your wpf app snapping / sticky. It works great:

http://programminghacks.net/2009/10/19/download-snapping-sticky-magnetic-windows-for-wpf/

Ricibald
Perfect, thanks!
Andrija