SplitView Menu in Universal Windows (UWP) – Part2

uwp split view drawer

In part 1 (SplitView Menu Control – Part 1) I showed code for implementing my SplitView Menu control in a simple ‘standard’ scenario.

As mentioned in the first part of this series, the ‘Universal Windows Platform’ (UWP) is the platform that drives the new Windows 10 apps, and the continuum features that allows Windows 10 apps to run across multiple screen-sizes whilst ‘adapting’ the user interface to provide a consistently good UX at all times.

This series of articles demonstrates my implementation of the SplitView (hamburger) menu, and is a component with source code available from my GitHub repository here:

https://github.com/deanchalk/SplitViewMenuUWP

The next scenario is detailed below

Scenario 2 – Custom ‘Container’ style and Item Template

To provide a ‘custom’ styling opportunity for the menu items, the control includes a custom ‘ContainerStyle’ as a dependency property, as well as an opportunity to set an ‘ItemTemplate’ too

Here is the XAML

Here is the ‘code behind’ binding code

And here is the main ViewModel

Here is what it looks like. Please forgive the lack of effort in the styling – the aim was to demonstrate the capabilities of the control, rather than my design prowess (or lack thereof)

SplitView control in 'compact' mode. The menu is collapsed and pops out

SplitView on larger screens. The menu is visible by default

If you like what you see so far, the next installment is here – SplitView Menu Control – Part 3
Again, your comments are welcome – please add them below.
Don’t forget – all source code for this article (including the complete component source-code) is available from my GitHub repository. https://github.com/deanchalk/SplitViewMenuUWP

Dean

About the author

Dean Chalk

I am a freelance (contract) Microsoft WPF developer, specialising in challenging, high-performance user interface development. I have been working exclusively on enterprise WPF app development since 2006, and I have been a part of some of the most demanding WPF projects ever created withing the Investment Banking / trading industry.


>