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

#1673 Adding a Color property to Light #1698

Merged
merged 4 commits into from
Dec 20, 2017

Conversation

shenchauhan
Copy link
Contributor

Issue: #
#1673

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[X] Feature
[ ] Code style update (formatting)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build or CI related changes
[ ] Documentation content changes
[ ] Sample app changes
[ ] Other... Please describe:

What is the current behavior?

Defaults to white

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Docs have been added / updated (for bug fixes / features)
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)

What is the new behavior?

A new Color property which allows you to change the color of the light.

Does this PR introduce a breaking change?

[ ] Yes
[X] No

Other information

/// <returns>An animation set.</returns>
public static AnimationSet Light(
this FrameworkElement associatedObject,
double distance = 0d,
double duration = 500d,
double delay = 0d)
double delay = 0d,
Color color = default(Color))
Copy link
Contributor

Choose a reason for hiding this comment

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

By default, shouldn't it be Colors.White instead of Black?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good spot, I changed the type to be nullable, so if it detects null it will change it to White. You can't set the Color object as a default parameter as it needs to be a compile time constant.

Copy link
Contributor

@Odonno Odonno left a comment

Choose a reason for hiding this comment

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

Seems good.

@nmetulev nmetulev merged commit ec7e5fd into CommunityToolkit:master Dec 20, 2017
@windowstoolkitbot
Copy link

This PR is linked to unclosed issues. Please check if one of these issues should be closed: #1673

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

Successfully merging this pull request may close these issues.

4 participants