New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WinRT/UWP] Fix Opacity behavior with ProgressBar #695

Merged
merged 5 commits into from Mar 14, 2017

Conversation

Projects
None yet
5 participants
@pauldipietro
Member

pauldipietro commented Jan 17, 2017

Description of Change

An issue is present in WinRT/UWP where the ActivityIndicator shows up on the screen even if its IsRunning value is initially set to false. The present implementation of this modifies the Opacity value on the control to either 1 or 0 if the indicator is visible or not. This causes some unintended behavior because the fact that Element.Opacity being set to 1 causes the VisualElementTracker to set the control's Opacity back to that value. Users presently have to use workarounds to get IsRunning = false working correctly, and in the small chance they might not want to use something smaller than a 1 value for the opacity, it has to be explicitly set after setting IsRunning to true.

Adding in an ElementOpacity value via a FormsProgressBar class allows that value to be set by the user to a different value if desired. The added in templates then bind to that ElementOpacity value opposed to Control's Opacity so as to not cause any negative interactions between the two. This keeps the current behavior the same (by setting the Opacity on a non-running indicator opposed to setting its Visibility to Collapsed) while fixing two issues.

Bugs Fixed

https://bugzilla.xamarin.com/show_bug.cgi?id=37290

API Changes

Add the FormsProgressBar class (inherits from Windows.UI.Xaml.Controls.ProgressBar) to the WinRT project (linked to by UWP as well)

Behavioral Changes

None expected

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense
@rmarinho

This comment has been minimized.

Show comment
Hide comment
@rmarinho

rmarinho Feb 2, 2017

Member

Can you rebase @pauldipietro ?

Member

rmarinho commented Feb 2, 2017

Can you rebase @pauldipietro ?

@hartez

This comment has been minimized.

Show comment
Hide comment
@hartez

hartez Feb 2, 2017

Member

@pauldipietro You're missing an entry in the .nuspec for the FormsProgressBarStyle .xbf file.

Member

hartez commented Feb 2, 2017

@pauldipietro You're missing an entry in the .nuspec for the FormsProgressBarStyle .xbf file.

@hartez hartez self-assigned this Feb 2, 2017

@pauldipietro

This comment has been minimized.

Show comment
Hide comment
@pauldipietro

pauldipietro Feb 2, 2017

Member

Updated; let me know if it's incorrect in any way.

Member

pauldipietro commented Feb 2, 2017

Updated; let me know if it's incorrect in any way.

@hartez

This comment has been minimized.

Show comment
Hide comment
@hartez

hartez Feb 6, 2017

Member

@pauldipietro Looks like there's still an entry missing - I think in the WinRT section? For tablet?

Member

hartez commented Feb 6, 2017

@pauldipietro Looks like there's still an entry missing - I think in the WinRT section? For tablet?

@pauldipietro

This comment has been minimized.

Show comment
Hide comment
@pauldipietro

pauldipietro Feb 6, 2017

Member

@hartez Added, thanks.

Member

pauldipietro commented Feb 6, 2017

@hartez Added, thanks.

pauldipietro and others added some commits Feb 7, 2017

@rmarinho

This comment has been minimized.

Show comment
Hide comment
@rmarinho

rmarinho Mar 8, 2017

Member

@hartez can you do a final review?

Member

rmarinho commented Mar 8, 2017

@hartez can you do a final review?

@rmarinho rmarinho requested a review from hartez Mar 8, 2017

@rmarinho rmarinho merged commit 83fd275 into master Mar 14, 2017

6 checks passed

Android-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: UI Tests :: OSX Test Cloud Package - Run Android 6.0.1 : Tests passe…
Details
OSX-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: OSX Debug : Running
Details
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: Windows Debug : Tests passed: 3744, ignored: 10
Details
iOS10-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS10 : Tests p…
Details
iOS8-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified IOS8 : Tests pa…
Details
iOS9-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS9 : Tests pa…
Details

@rmarinho rmarinho deleted the fix-bugzilla37290 branch Mar 22, 2017

@samhouts samhouts added D-15.4 and removed cla-not-required labels Oct 10, 2017

@samhouts samhouts modified the milestones: 2.3.0, 2.3.5 Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment