

|
private void TapGestureRecognizer_Tapped(object sender, EventArgs e)
{
this.popupLayout.PopupView.WidthRequest = 250;
//// Calculating center position based on tabview width and popup view width.
var centerPostionToScreen = (tabView.Width - this.popupLayout.PopupView.WidthRequest) / 2;
//// Default x position where popup view is going to layout.
var popupCurrentX = (tabView.Width - tabView.CenterButtonSettings.Width) / 2;
//// Calculating difference value to center the popup view from its current x position.
var startPoint = popupCurrentX - centerPostionToScreen;
popupLayout.ShowRelativeToView(tabView.CenterButtonView, RelativePosition.AlignTop, -startPoint, 0);
} |