-
Notifications
You must be signed in to change notification settings - Fork 1.4k
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Feature] Add Size Extensions #3317
Labels
Completed 🔥
feature request 📬
A request for new changes to improve functionality
good first issue
Issues identified as good for first-time contributors
help wanted
Issues identified as good community contribution opportunities
Milestone
Comments
michael-hawker
added
the
feature request 📬
A request for new changes to improve functionality
label
May 30, 2020
Hello, 'michael-hawker! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future! |
ghost
added
the
needs triage 🔍
label
May 30, 2020
ghost
added
the
needs attention 👋
label
Jun 14, 2020
michael-hawker
added
good first issue
Issues identified as good for first-time contributors
help wanted
Issues identified as good community contribution opportunities
and removed
needs attention 👋
needs triage 🔍
labels
Sep 14, 2020
7 tasks
ghost
added
the
In-PR 🚀
label
Sep 21, 2020
ghost
pushed a commit
that referenced
this issue
Sep 24, 2020
## Closes #3317 <!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. --> <!-- Add a brief overview here of the feature/bug & fix. --> ## PR Type What kind of change does this PR introduce? <!-- Please uncomment one or more that apply to this PR. --> <!-- - Bugfix --> - 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 new behavior? <!-- Describe how was this issue resolved or changed? --> This PR adds new extensions to easily convert `Windows.Foundation.Size` and `Point` values to `Rect`: ```csharp namespace Microsoft.Toolkit.Uwp.Extensions { public static class SizeExtensions { public static Rect ToRect(this Size size); public static Rect ToRect(this Size size, double x, double y); public static Rect ToRect(this Size size, Point point); } public static class PointExtensions { public static Rect ToRect(this Point point, double width, double height); public static Rect ToRect(this Point point, Point end); public static Rect ToRect(this Point point, Size size); } } ``` ## PR Checklist Please check if your PR fulfills the following requirements: - [X] Tested code with current [supported SDKs](../readme.md#supported) - [ ] ~~Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR link -->~~ - [ ] ~~Sample in sample app has been added / updated (for bug fixes / features)~~ - [ ] ~~Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets)~~ - [X] Tests for the changes have been added (for bug fixes / features) (if applicable) - [X] Header has been added to all new source files (run *build/UpdateHeaders.bat*) - [X] Contains **NO** breaking changes
ghost
locked as resolved and limited conversation to collaborators
Nov 23, 2020
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Completed 🔥
feature request 📬
A request for new changes to improve functionality
good first issue
Issues identified as good for first-time contributors
help wanted
Issues identified as good community contribution opportunities
Describe the problem this feature would solve
We have a lot of this pattern in the toolkit:
Describe the solution
It'd be great to have some extensions for size:
Thoughts?
The text was updated successfully, but these errors were encountered: