xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

Xamarin.Forms.Platform.UWP.DatePickerRenderer measured size returns 0 #7380

Open DeepikaBalaSubramaniyan opened 5 years ago

DeepikaBalaSubramaniyan commented 5 years ago

Description

Hi Team,

We at Syncfusion develop data visualization controls for Xamarin, Please refer the below link for a description about us. UserGuide: https://help.syncfusion.com/xamarin/introduction/overview FeatureTour: https://www.syncfusion.com/products/xamarin.

We have noticed the bug, Xamarin.Forms.Platform.UWP.DatePickerRenderer measured height and width size was return 0 instead of measured value, but other renderers like label renderer gives correct width and height. We have CustomControl, In that we can load any forms view to CustomControl ContentTemplate property by using DataTemplate. Here control width and height depends on loaded forms view width and height. When DatePicker was loaded as control ContentTemplate unable to get the DatePicker correct width and height, We have measured the DataPicker height and width by using formsView.Measure(double.PositiveInfinity, double.PositiveInfinity, MeasureFlags.IncludeMargins); this codes after creating native renderer. But datepicker width and height returns 0, So our control width also set as 0. Instead of DatePicker if I load other forms view like label, able to get the measured size, So our control also loaded with correct width and height.

We have replicated the same scenario in simple sample, In that we have measured DatePicker size after creating UWP renderer, Here I got measured size is 0 instead of measured value. In the same sample I have measured the label width and height too, for label renderer able to get the correct measured value. In Android platform DatePickerRenderer also gives correct measured value.

Steps to Reproduce

  1. Run the attached sample in UWP platform
  2. Click the button named as ClicktoMeasureView
  3. Check the datepicker measure size value from button click, Here you can able to see datePicker size width and height value as 0 instead of measured value.
  4. But for label renderer measured size gives correct width and height

Expected Behavior

Should get DatePicker measured width and height in UWP Platform as label renderer.

Actual Behavior

Not getting DatePicker renderer measured width and height in UWP Platform

Basic Information

Screenshots

image

Reproduction Link

https://www.syncfusion.com/downloads/support/directtrac/general/ze/FrameWorkPicker946135784

DeepikaBalaSubramaniyan commented 5 years ago

Hi @samhouts

Any update on this issue? We are waiting for this issue for a long time.

samhouts commented 5 years ago

@DeepikaBalaSubramaniyan This is on the backlog. I don't currently have an estimate of when we may begin work on this item. Thank you for your patience!

DeepikaBalaSubramaniyan commented 4 years ago

Hi @samhouts

Any update on this issue ?

samhouts commented 4 years ago

@DeepikaBalaSubramaniyan I have no update yet. We're still working on our backlog. We would welcome any help with this issue! Thanks!