private void RefreshFlyoutLayoutBehavior(FlyoutLayoutBehaviorType flyoutBehaviorType) { int detailWidthRequest = 0; Gdk.Point point = default(Gdk.Point); switch (_flyoutBehaviorType) { case FlyoutLayoutBehaviorType.Split: detailWidthRequest = _lastAllocation.Width - DefaultFlyoutWidth; point = new Gdk.Point(_flyout.WidthRequest, 0); break; case FlyoutLayoutBehaviorType.Default: case FlyoutLayoutBehaviorType.Popover: detailWidthRequest = _lastAllocation.Width; point = new Gdk.Point(0, 0); break; } if (detailWidthRequest >= 0) { _detail.WidthRequest = detailWidthRequest; _detail.MoveTo(point.X, point.Y); } }
public FlyoutPage() { _animationsEnabled = false; _flyoutBehaviorType = FlyoutLayoutBehaviorType.Default; // Flyout Stuff _flyoutContainerWrapper = new EventBox(); _flyoutContainer = new VBox(false, 0); _titleContainer = new FlyoutPageFlyoutTitleContainer(); _titleContainer.HamburguerClicked += OnHamburgerClicked; _titleContainer.HeightRequest = GtkToolbarConstants.ToolbarHeight; _flyoutContainer.PackStart(_titleContainer, false, true, 0); _flyout = new EventBox(); _flyoutContainer.PackEnd(_flyout, false, true, 0); _flyoutContainerWrapper.Add(_flyoutContainer); // Detail Stuff _detail = new EventBox(); Add(_detail); Add(_flyoutContainerWrapper); }