Sometimes when I see a mockup for something, I realise that what should be a really simple feature simply... isn't supported in Noesis or WPF. And that sucks! But I realised that I'm able to make these features a reality, and it's an amazing feeling to be able to actually implement a mockup exactly as the artists intended, and give them new features they didn't realise they had access to.
So, with that, let me introduce my custom Justify Panel:
The intention of this panel is to distribute items evenly across available space, which seems like such a normal thing that WOULD be included in base WPF, but somehow isn't. This was my first time touching things like layout and arrange overrides, which really boosted my confidence in making custom controls.
It originally only worked as a horizontal layout panel, but then I realised that that was silly, and I could ABSOLUTELY make it work vertically as well, so I did! Easy done!
At this point I thought I was done, but then I realised I hadn't accounted for there being only two items. It's an edge case we haven't used all that much, but it needed to happen if we had some sort of dynamic list that we were adding items to on the fly, so I decided to use the Alignment properties on the WPF Panels to adjust the behaviour.
Stretch does what you expect - it snaps each item to the edge of the available space, and has a big empty space in the middle, but aligning to the centre gives each item an even amount of space, including around the edges. It just gives a bit more flexibility!
A really good use case for this panel is a tab header - here's me switching it from using a regular, horizontally aligned StackPanel, compared to my Justify Panel with stretch alignment.
With things like this, I always mock them up and make sure they're entirely functional in C# first, as this is how they'll work nicely in Microsoft Blend, and therefore be able to be viewed and tested by artists without opening up the game. Then I'll write it in C++ so we can use it in engine, using my C# as a model. This method is a lot easier for me, but also provides so many more benefits for those using Blend!