We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfPopup with arrow and relative positioning using MVVM

Thread ID:





143159 Mar 6,2019 09:31 PM UTC Mar 7,2019 12:17 PM UTC Xamarin.Forms 1
Tags: SfPopup
Øystein Günther
Asked On March 6, 2019 09:31 PM UTC

I would like to show popups relative to the relevant UI controller. I.e. if one clicks on an Entry then I would like to show a popup. Similarly when eg. tapping a Label. In addition to this, I would like the popup to show an arrow (as seen on several IOS apps), pointing to the UI element that triggered the popup and therefore is relevant. If a popup has its "origin" from an Entry then often I would like that selected values in the popup should be reflected in the Entry when the popup is closed. That's why the arrow is an important element. All done in MVVM. I included an image in order to visualize what I had in mind. Could this be done using Sfpopup?

Attachment: popup_arrow_a.png_1fa539e3.zip

Subburaj Pandian Veluchamy [Syncfusion]
Replied On March 7, 2019 12:17 PM UTC

Hi Øystein, 
Thank you for contacting Syncfusion support. 
Based on the provided information, we have checked your requirement of “Handling Popup layout position based on the requirement” in Xamarin.Forms can be achieved using the ShowRelativeToView property of popupLayout. Using this property, you can position the popup layout based on the necessity whether in Right, Top and Bottom. 
We have prepared simple sample based on your requirement, please find the sample by the following link. 
Sample link: PopupRelativeSample 
In the sample, we have disabled both Header and Footer, and we maintained Content alone by setting the ContentTemplate. In the template, we have added button and label with the values. By setting position as Right in the ShowRelativeToView of Popup layout, positioned the layout in the Right.  
Please refer the following code example, 
private void ClickToShowPopup_Clicked(object sender, EventArgs e) 
            popupLayout.ShowRelativeToView(layout, RelativePosition.AlignToRightOf, 0, 0); 
We hope this helps. Please let us know, if you have any query. 
Subburaj Pandian V  


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon