Resize the popup according to the size of the ContentTemplate

Hi,

how does one achieve, that the popup resizes to the space needed by its ContentTemplate?

As far as I understood, in the SampleBrowser.SfPopupLayout.sln the size of the popup is set to absolute values via .RequestWidth() and .RequestHeight. This is not ideal, if the controls in the ContentTemplate are of dynamic size, e.g. due to text translations.

Thanks, Ulrich

3 Replies

SS Suhasini  Suresh Syncfusion Team May 24, 2018 02:05 PM UTC

Hi Ulrich, 
 
Thanks for contacting Syncfusion Support. 
 
At present it is not possible to resize the popup based on the ContentTemplate dynamically. However, you can customize the height and width to the popup by setting the HeightRequest and WidthRequest to the SfPopupLayout.PopupView. We will consider this to adapt to the run time changes as well so that the size of the popup size can be updated in the runtime by changing the HeightRequest and WidthRequest. This changes can be expected to be available in our upcoming 2018 Volume 2 service pack release.  
 
Regards, 
Suhasini  



UN Unknown Syncfusion Team May 25, 2018 06:06 AM UTC

Hi Suhasini,

this is good news, thank you very much!

Wouldn't it be not also great, if the popup would take part in the OnMeasure/MeasureInvalidated cycle and resize itself according to its children? Like a layout does? This would make the whole process "automagical" and like one is used to in Xamarin Froms (or WPF, ...)?

Best regards, Ulrich


SS Suhasini  Suresh Syncfusion Team May 28, 2018 01:05 PM UTC

Hi Ulrich, 
 
Thanks for your update. 
 
We have added “Support for auto resizing popup based on the ContentTemplate” in our feature request lists. 
 
We usually plan and work on the features based on the priority and demand for the feature from our customers. For the 2018 Volume 3 main release, we have targeted support for bubble headed popup, addition of two more animations to the popup and run time support for PopupView’s size change based on the PopupView.HeightReqeust and PopupView.WidthRequest, which have higher traction and requests among our customers right now. 
 
So, the support for auto resizing popup based on the ContentTemplate will be available in any of our upcoming release, please check the release notes on the Syncfusion web site, to track the support and availability of the feature. 
 
Regards, 
Suhasini  


Loader.
Up arrow icon