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
close icon

PopupView inside SfPopopLayout not possible

Hello,

I'm trying to get started with the SfPopupLayout, but it's not possible to put a PopupView inside the SfPopupLayout, because the Property "PopupView" its only possible to get, but not set. How can I set things like ContentTemplate or HeaderTitle in XAML? 

Thanks in advance!

3 Replies

MK Muthu Kumaran Gnanavinayagam Syncfusion Team February 6, 2020 11:37 AM UTC

Hi Alexander, 
 
Thank you for using Syncfusion products. 
 
We have checked the reported query “Need to customize the template of PopupView in XAML” from our side. We would like to let you know that you can add any customized template inside the ContentTemplate of PopupView inside the SfPopupLayout. 
 
You can refer the below UG documentation link for more details on adding the PopupView inside SfPopupLayout. 
 
UG links :  
 
 
 
Please let us know if you require further assistance. 
 
Regards, 
G.Muthu kumaran.  



AS Alexander Sobotta February 7, 2020 08:39 AM UTC

I found a workaround for that, I defined the datatemplate in the page.resources and assigned that in the code behind like this:

myPopupLayout.PopupView.ContentTemplate = myTemplate 

and I had to assign the Title, button texts etc. like this too, but its inconvenient. 
The documentation seems to be wrong or deprecated, because I cannot set the PopupView property neither in code behind, nor in xaml, like this:

 <sfPopup:SfPopupLayout x:Name="popupLayout">
    <sfPopup:SfPopupLayout.PopupView>
        <sfPopup:PopupView>
            <sfPopup:PopupView.ContentTemplate>
                <DataTemplate>
I switched to the definition of the SfPopupLayout, and found out that the PopupView property is write-protected: (see screenshot in attached zip file)

Is that a bug or is that intended? I'm using version 17.4.0.46. I see there is a newer version (17.4.0.47) I just updated my Syncfusion nugets three days ago, maybe that update will fix it.





Attachment: SfPopupLayoutScreenshot_e0d7f47f.zip


MK Muthu Kumaran Gnanavinayagam Syncfusion Team February 10, 2020 11:26 AM UTC

Hi Alexander, 
 
We have checked the reported query “Unable to define PopupView in XAML or code behind” from our side. We would like to let you know that the PopupView instance created and defined for the SfPopupLayout cannot be modified in the application. However you can modify the properties of the PopupView as specified in the documentation.  
Example:
 
 
In the above example, you can see that the ContentTemplate property of the PopupView is modified for the defined PopupView. Here the PopupView instance created is not altered but its property value is modified. So you need to set the value for PopupView properties directly without creating new instance of PopupView as specified in the documentation. We have ensured the working status of both 17.4.0.46 and 17.4.0.47 nuget versions of SfPopupLayout. 
 
Please let us know if you require further assistance. 
 
Regards, 
G.Muthu kumaran. 


Loader.
Live Chat Icon For mobile
Up arrow icon