NeedlePointer.Thickness works strange in iOS

I noticed strange NeedlePointer behaviour in Xamarin.Forms iOS app (in Android everything seems to be fine) in Xamarin.Forms Prism. After navigating from one page to another and than returning back, thickness seems to be smaller and smaller, and after 3-4 go and back NeedlePointer is not visible. The only way to make it visible again is to change device orientation, so all sizes are invalidated and return to correctly calculated value.

In my case gauge elements are scaled depend on gauge size. Everything works fine, except NeedlePointer Thickness. My first guess was that there is mistake in size calculations, but after detailed check I noticed that navigating from and going back do not call calculations again, so there is not new Thickness value, but element is smaller and smaller.

Even if for example I bind NeedlePointer.Thickness with LabelFontSize, effect is same.

<xForms:NeedlePointer  Value="{Binding BoxCounter, Converter={converters:ValueTo1kConverter}}" 

                                        Thickness="{Binding Source={x:Reference MyScale}, Path=LabelFontSize}"

                                        KnobColor="Goldenrod"  KnobStrokeColor="DarkGoldenrod" 

                                        Color="Silver" TailLengthFactor="0.2" LengthFactor="0.875"

                                        EnableAnimation="False"

                                        Type="Bar"/>


LabelFontSize is correct, does not change when not necessary, but NeedlePointer.Thickness is smaller and smaller with every navigating from and going back.

This problem appear only in iOS platform project. In Android everything seems to be fine.




5 Replies

MP Michael Prabhu M Syncfusion Team October 2, 2018 11:42 AM UTC

Hi Radoslaw Kubas, 
 
Greetings from Syncfusion, we have analyzed your query and prepared a simple sample using Circular gauge and the needle pointer is bound to the slider, but we are afraid we were not able to reproduce the issue while navigating back and forth from the navigation page. The needle pointer thickness remains the same. The sample we prepared to replicate the issue can be downloaded from the below link. 
 
 
Since we are not aware of your exact application scenario we were not able to reproduce this at our end. So, can you please revert us by modifying the sample above to replicate your application scenario? this will help us to investigate further and provide you a better solution at the earliest. 
 
Thanks, 
Michael 




RK Radoslaw Kubas October 3, 2018 09:33 AM UTC

Hello,

Thank you for your answer. I created simple solution to show the problem.


It seems problem appears only when NeedlePointer type is "Bar"and there is "TailLengthFactor".

<xForms:SfCircularGauge VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand">

            <xForms:SfCircularGauge.Scales>

                <xForms:Scale>

                    <xForms:Scale.Pointers>

                        <xForms:NeedlePointer Type="Bar"

                                              TailLengthFactor="0.2"/>

                    xForms:Scale.Pointers>

                xForms:Scale>

            xForms:SfCircularGauge.Scales>

        xForms:SfCircularGauge>



RK Radoslaw Kubas October 3, 2018 09:52 AM UTC

I checked just now the sample you created and the problem appears there also (in iOS). Just start sample in iOS Simulator, click "Navigate Page" than "Back" button and NeedlePointer Thickness decreases (and if you continue same navigate and back, it decreases more and more). 


RK Radoslaw Kubas October 3, 2018 10:10 AM UTC

I attached some screen capture to show the problem in Sample.

Attachment: SfCircularGauge.mov_c8de05d6.zip


MP Michael Prabhu M Syncfusion Team October 4, 2018 08:59 AM UTC

Hi Radoslaw, 
 
Query: Needle pointer thickness reduces on page navigation. 
 
We have checked your scenario and we were able to reproduce the reported issue at our end. 
We confirm this as a bug and logged defect report for this issue in XForms.iOS. This fix will be available in our Volume 3 SP1 release which is expected to be rolled out at the end of October 2018. 
 
We appreciate your patience until then. 

Thanks, 
Michael 


Loader.
Up arrow icon