WinRT ProgressBar over ProgressRing

RyanDixonRyanDixon ✭✭✭USMember ✭✭✭

Just a quick question.
Does anyone know why XForms would choose to use an indeterminate progressbar over a progressring in WinRT based platforms?
It seems like it adds boilerplate as you have to take into account width/height across each platform rather than just setting it once.

ie:
Device.OnPlatform(
Uwp -> Make wider but shorter,
Android -> Generally use a square container,
iOS -> This doesnt even work properly and completely ignores height/width request properties set
)

I know its easily fixed through just ripping their source and modifying to your hearts content as a custom renderer, but just curious as to why this choice was made!

~Ry

Best Answer

Answers

  • ClintStLaurentClintStLaurent ✭✭✭✭✭ USUniversity ✭✭✭✭✭

    @RyanDixon

    When you say "over" are you saying "on top of" - its showing both a bar and ring, one on top of the other ? I'd like to see a screen shot of that.

    Or are you saying "instead of"? WinRT uses a bar instead of a ring? Xamarin.Forms doesn't decided what control to use for activity. That comes from the OS to keep a consistent user experience. On iOS you get the iOS control. On WinRT you get the WinRT control.

  • RyanDixonRyanDixon ✭✭✭ USMember ✭✭✭

    @ClintStLaurent said:
    @RyanDixon

    When you say "over" are you saying "on top of" - its showing both a bar and ring, one on top of the other ? I'd like to see a screen shot of that.

    Or are you saying "instead of"? WinRT uses a bar instead of a ring? Xamarin.Forms doesn't decided what control to use for activity. That comes from the OS to keep a consistent user experience. On iOS you get the iOS control. On WinRT you get the WinRT control.

    I mean instead of :)
    And I know, what I mean is if you look at the XForms source for the Activity Indicator here: https://github.com/xamarin/Xamarin.Forms/blob/bdd14c5434a6eb1c528bb30f65c708bb349256a2/Xamarin.Forms.Platform.WinRT/ActivityIndicatorRenderer.cs

    Windows RT has API's for both the "ProgressBar" and "ProgressRing", but Xamarin selected to use the former which can be seen in the extension ViewRenderer<ActivityIndicator, Windows.UI.Xaml.Controls.ProgressBar>.

    I guess my question is why is Xamarin using ViewRenderer<ActivityIndicator, Windows.UI.Xaml.Controls.ProgressBar> over ViewRenderer<ActivityIndicator, Windows.UI.Xaml.Controls.ProgressRing>

Sign In or Register to comment.