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

Many popup in same page

Hello I have a page with 3 buttons and I'd like each button to display a different popup ... its 3 popup defined on the same page ... How to do that ? I searched the Documentation without success.
Thanks

3 Replies

MK Muthu Kumaran Gnanavinayagam Syncfusion Team February 3, 2020 04:58 AM

Hi Emmanuel, 
 
Thank you for using Syncfusion products. 
 
We have checked the reported query “Need to show 3 different popups in a single page” from our side. We would like to let you know that you can create and show any number of popups in a page. You could initialize the number of instances required and in a button clicked action you can display popup by calling the SfPopupLayout.Show method. 
 
For your reference, we have attached the working sample and you can download it from the below link. 
 
 
Please let us know if you require further assistance. 
 
Regards, 
G.Muthu kumaran.  



EC Emmanuel Cesaire FOKO February 4, 2020 07:44 AM

Merci pour la réponse rapide ... en fait j'aimerais le faire en XAML pas dans le code derrière ... est-ce possible? 


KK Karthikraja Kalaimani Syncfusion Team February 5, 2020 05:24 AM

Hi Emmanuel,

Thank you for the update.

We have prepared a sample a four requirement and in our sample we initialized multiple popup in XAML. For more details please refer to the below code example and sample.

Code Example,
 
<sfPopup:SfPopupLayout x:Name="popup1"> 
                <sfPopup:SfPopupLayout.PopupView> 
                    <sfPopup:PopupView> 
                        <sfPopup:PopupView.ContentTemplate> 
                        <DataTemplate> 
                            <Label Text="This is Popup1"></Label> 
                        </DataTemplate> 
                        </sfPopup:PopupView.ContentTemplate> 
                    </sfPopup:PopupView> 
                </sfPopup:SfPopupLayout.PopupView> 
            </sfPopup:SfPopupLayout> 
            <sfPopup:SfPopupLayout x:Name="popup2"> 
                <sfPopup:SfPopupLayout.PopupView> 
                    <sfPopup:PopupView> 
                        <sfPopup:PopupView.ContentTemplate> 
                            <DataTemplate> 
                                <Label Text="This is Popup2"></Label> 
                            </DataTemplate> 
                        </sfPopup:PopupView.ContentTemplate> 
                    </sfPopup:PopupView> 
                </sfPopup:SfPopupLayout.PopupView> 
            </sfPopup:SfPopupLayout> 
            <sfPopup:SfPopupLayout x:Name="popup3"> 
                <sfPopup:SfPopupLayout.PopupView> 
                    <sfPopup:PopupView> 
                        <sfPopup:PopupView.ContentTemplate> 
                            <DataTemplate> 
                                <Label Text="This is Popup3"></Label> 
                            </DataTemplate> 
                        </sfPopup:PopupView.ContentTemplate> 
                    </sfPopup:PopupView> 
                </sfPopup:SfPopupLayout.PopupView> 
            </sfPopup:SfPopupLayout> 

Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/Popup_Demo_151137831638164.zip

Regards,
Karthik Raja


Loader.
Live Chat Icon For mobile
Up arrow icon