Skip to content
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

Added the Background property to the ProgressRing page #1163

Merged
merged 3 commits into from
Jan 20, 2023

Conversation

gregwoo-microsoft
Copy link
Contributor

Description

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

<local:ControlExample.Xaml>
<x:String>
&lt;ProgressRing Width="60" Height="60" Value="$(DeterminateProgressValue)" IsIndeterminate="False"/&gt;
&lt;ProgressRing Width="60" Height="60" Value="$(DeterminateProgressValue)" IsIndeterminate="False" $(Background)/&gt;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a line break for this would be good so that we don't have vertical scrolling.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! :)

RevealBackgroundProperty1.IsEnabled = showBackgroundProperty;
}

private void Background_SelectionChanged2(object sender, SelectionChangedEventArgs e)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we refactor this to determine only have one handler that selects the correct progressring based on the sender?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how we can get that information from the sender. Any idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I agree, let's figure this out before merging it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can either set the tag property on the ComboBox and retrieve that through the sender property or doing something like this:

private void Background_SelectionChanged2(object sender, SelectionChangedEventArgs e)
    var progressRing = sender == BackgroundComboBox1 ? ProgressRing1 : ProgressRing2;
    // Color progress ring accordingly
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's perfect! Thank you @chingucoding. I just pushed the change.

@marcelwgn marcelwgn merged commit 4ed3bff into microsoft:main Jan 20, 2023
@gregwoo-microsoft gregwoo-microsoft deleted the dev/progress_ring branch January 24, 2023 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants