//private Label label; protected override void OnBindingContextChanged() { base.OnBindingContextChanged(); this.ViewModel = BindingContext as TestPageAllXamlViewModel; this.spTest.SetBinding(SlidingUpPanel.PanelRatioProperty, new Binding { Path = "PanelRatio" }); this.spTest.SetBinding(SlidingUpPanel.HideTitleViewProperty, new Binding { Path = "HideTitleView" }); this.spTest.WhenPanelRatioChanged += SpTest_WhenPanelRatioChanged; this.spTest.WhenSlidingPanelStateChanged += SpTest_WhenSlidingPanelStateChanged; SlidingPanelConfig config = new SlidingPanelConfig(); config.PrimaryFloatingActionButton = GetPrimaryFloatingActionButton(); config.SecondaryFloatingActionButton = GetSecondaryFlotingButton(); spTest.ApplyConfig(config); if (spTest.CurrentState != SlidingPanelState.Expanded) { spTest.HidePanel(); } else { spTest.ShowCollapsedPanel(); } }
private void SetupSlidingPanel() { InitGoogleMap(); SlidingPanelConfig config = new SlidingPanelConfig(); config.MainView = GetMainStackLayout(); config.HideNavBar = true; config.PanelRatio = 0.6; config.IsPanSupport = true; config.TitleView = GetTitleStackLayout(); config.TitleHeightRequest = 80; config.TitleBackgroundColor = Color.Green; config.BodyView = GetBodyStackLayout(); config.BodyBackgroundColor = Color.Blue; config.PrimaryFloatingActionButton = GetPrimaryFloatingActionButton(); config.SecondaryFloatingActionButton = GetSecondaryFloatingActionButton(); config.PictureBackgroundColor = Color.White; config.HeaderBackgroundColor = Color.White; config.PictureImage = GetHondaPictureImage(); config.HeaderLeftButton = GetBackButtonImage(); spTest.ApplyConfig(config); }
private void SetupSlidingPanel() { SlidingPanelConfig config = new SlidingPanelConfig(); config.MainView = GetMainStackLayout(); config.HideNavBar = true; spTest.ApplyConfig(config); }
protected override void OnBindingContextChanged() { base.OnBindingContextChanged(); SlidingPanelConfig config = new SlidingPanelConfig(); //config.MainStackLayout = mainStackLayout; StackLayout titleStackLayout = new StackLayout(); titleStackLayout.Children.Add(new Label { Text = "Test Title x" }); //config.TitleStackLayout = titleStackLayout; config.TitleBackgroundColor = Color.Green; //spTest.ApplyConfig(config); }