summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.UAP
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.UAP')
-rw-r--r--Xamarin.Forms.Platform.UAP/MasterDetailControl.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.UAP/MasterDetailControl.cs b/Xamarin.Forms.Platform.UAP/MasterDetailControl.cs
index 51f737f8..dddd0ba6 100644
--- a/Xamarin.Forms.Platform.UAP/MasterDetailControl.cs
+++ b/Xamarin.Forms.Platform.UAP/MasterDetailControl.cs
@@ -239,6 +239,13 @@ namespace Xamarin.Forms.Platform.UWP
_bottomCommandBarArea = GetTemplateChild("BottomCommandBarArea") as Border;
_topCommandBarArea = GetTemplateChild("TopCommandBarArea") as Border;
+ if (_commandBar != null && _bottomCommandBarArea != null && _topCommandBarArea != null)
+ {
+ // We have to wait for the command bar to load so that it'll be in the control hierarchy
+ // otherwise we can't properly move it to wherever the toolbar is supposed to be
+ _commandBar.Loaded += (sender, args) => UpdateToolbarPlacement();
+ }
+
UpdateToolbarPlacement();
UpdateMode();