Skip to content

[Feature] Add Size Extensions #3317

@michael-hawker

Description

@michael-hawker

Describe the problem this feature would solve

We have a lot of this pattern in the toolkit:

new Rect(0, 0, size.Width, size.Height)

Describe the solution

It'd be great to have some extensions for size:

size.ToRect() // Defaults to 0, 0
size.ToRect(point);
size.ToRect(x, y);

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Completed 🔥feature request 📬A request for new changes to improve functionalitygood first issueIssues identified as good for first-time contributorshelp wantedIssues identified as good community contribution opportunities

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions