//private void OnSizeChanged(object sender, EventArgs e) //{ // var page = (Xamarin.Forms.MasterDetailPage)sender; // Control.ApplyTemplate(); // ConfigureSplitView(Control, page); // page.SizeChanged -= OnSizeChanged; //} static void ConfigureSplitView(MasterDetailControl control, MasterDetailPage page) { try { if ((bool)page.GetValue(XamarinFormsGridView.Behaviours.MasterDetailPageBehaviour.IsDynamicMasterBehaviourEnabledProperty)) { var threshold = (double)page.GetValue(XamarinFormsGridView.Behaviours.MasterDetailPageBehaviour.DynamicMasterBehaviorThresholdProperty); if (page.Width <= threshold) { //control.CollapseStyle = Xamarin.Forms.PlatformConfiguration.WindowsSpecific.CollapseStyle.Partial; control.ShouldShowSplitMode = false; control.IsPaneOpen = false; } else { control.ShouldShowSplitMode = true; control.IsPaneOpen = true; } } } catch (Exception) { //Not sure why this is getting thrown. } }
public App() { Page page; InitializeComponent(); if (App.UserSession == null) { App.UserSession = new ZCMobileSystemConfiguration { SideContentVisibility = true }; } if (Properties.ContainsKey(SelectedDataCenter)) { App.UserSession.SelectedDataCenter = (string)Properties[SelectedDataCenter]; } if (!string.IsNullOrEmpty(App.UserSession.SelectedDataCenter)) { page = new LoginPage(); } else { page = new MainPage(); } App.Current.MainPage = MasterDetailControl.Create <MasterDetail, MasterDetailViewModel>(App.IsUSerLoggedIn, page); GetPageTitles(); }
public App() { InitializeComponent(); ViewFactory.Init(Assembly.GetExecutingAssembly()); MainPage = MasterDetailControl.CreateMainPage <MasterDetail, MasterDetailViewModel>(); Navigation = MainPage.Navigation; }
public App() { InitializeComponent(); MainPage = MasterDetailControl.Create<MasterDetail, MasterDetailViewModel>(); }