SfPopup in SfPopup

Should it be possible to have a SfPopup inside a SfPopup? ie I have a popup open and I need to open a map for a user to select a location that fills a latitude and longitude on the parent SfPopup. I cannot seem to get it to work. The popup shows up after I have closed and reopened the parent popup and is not bound to anything.

1 Reply 1 reply marked as answer

KK Karthikraja Kalaimani Syncfusion Team June 2, 2020 01:16 PM UTC

Hi Sean,

We can show a multiple popup and new popup will show on top of the previous popup. Please refer the  below code snippet and sample.

Code snippet :

 
[XAML]       
<StackLayout> 
            <sfPopup:SfPopupLayout x:Name="popup"> 
                <sfPopup:SfPopupLayout.PopupView> 
                    <sfPopup:PopupView HeaderTitle="Add Public Location" AutoSizeMode="Height" ShowCloseButton="False"> 
                        
                        <sfPopup:PopupView.ContentTemplate> 
                            <DataTemplate> 
                                <StackLayout> 
                                    <Button Text="click to show another popup" Clicked="Button_Clicked"></Button> 
                                </StackLayout> 
                            </DataTemplate> 
                        </sfPopup:PopupView.ContentTemplate> 
                    </sfPopup:PopupView> 
                </sfPopup:SfPopupLayout.PopupView> 
            </sfPopup:SfPopupLayout> 
            <Button Clicked="Button_Clicked1"></Button> 
        </StackLayout>
[C#]
SfPopupLayout popupLayout; 
        public MainPage() 
        { 
            InitializeComponent(); 
            popupLayout = new SfPopupLayout(); 
        } 
 
        private void Button_Clicked(object sender, EventArgs e) 
        { 
             
            popupLayout.HeightRequest = 200; 
            popupLayout.WidthRequest = 100; 
            popupLayout.PopupView.ContentTemplate = new DataTemplate(() => { Label label = new Label(); label.Text = "Second Popup"; return label; }); 
            popupLayout.Show(); 
        } 


Marked as answer
Loader.
Up arrow icon