From b886f5b3983afb7185dac3db854d028d34caca70 Mon Sep 17 00:00:00 2001 From: Nigel Sampson Date: Wed, 12 Aug 2015 08:51:41 +1200 Subject: [PATCH] SplitView convention --- src/Caliburn.Micro.Platform/ConventionManager.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Caliburn.Micro.Platform/ConventionManager.cs b/src/Caliburn.Micro.Platform/ConventionManager.cs index 001f56dd..553081e7 100644 --- a/src/Caliburn.Micro.Platform/ConventionManager.cs +++ b/src/Caliburn.Micro.Platform/ConventionManager.cs @@ -197,6 +197,19 @@ public static class ConventionManager { }; static ConventionManager() { +#if WINDOWS_UWP + AddElementConvention(SplitView.ContentProperty, "IsPaneOpen", "PaneClosing").GetBindableProperty = + delegate (DependencyObject foundControl) + { + var element = (SplitView)foundControl; + + if (!OverwriteContent) + return null; + + Log.Info("ViewModel bound on {0}.", element.Name); + return View.ModelProperty; + }; +#endif #if !WINDOWS_PHONE && !WinRT AddElementConvention(DatePicker.SelectedDateProperty, "SelectedDate", "SelectedDateChanged"); #endif