Is it possible to use the VariableSizedWrapGrid control in desktop apps (i.e. Windows 7 WPF applications)? Presently this control only seems available in WinRT, Windows 8, Windows Phone, etc. If it's possible, how? Otherwise, what option would I have to get the same sort of functionality?
For those who aren't familiar with the concept, it would be similar to a WrapPanel, however elements would fill open spaces in the panel rather than spill over onto the next row, like so (see also Masonry for jQuery):
I ended up utilizing Lizzaran's WPF-Masonry library, which is pretty nice. It didn't come with any dependency properties for proper binding, but it wouldn't be difficult to add them. I'm also using MahApps' latest Metro library (different than the one that's available through nuget) for their tile control, but that's not necessary.
Here's what it ended up looking like:
Here is the brunt of the code:
MainWindow.xaml:
MainWindow.xaml.cs:
Tile.xaml:
Tile.xaml.cs:
I added some animations to my tiles so that they expand when a user clicks on them. The Masonry library performs pretty well with an occasional glitch, but I'm pretty happy with how it turned out. I eventually added some UI logic to only allow for one tile to be expanded at time.