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

StretchDirection for Viewbox #5917

Merged
merged 4 commits into from
May 13, 2021

Conversation

MarchingCube
Copy link
Collaborator

What does the pull request do?

Implements StretchDirection as in WPF/WinUI https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.viewbox.stretchdirectionproperty?view=net-5.0

What is the current behavior?

Viewbox content is always scaled.

What is the updated/expected behavior with this PR?

One can control stretching behavior.

How was the solution implemented (if it's not obvious)?

Current Viewbox.Stretch is a bit problematic since it is a direct property for some reason. For backport reasons I won't change it in the current PR but I will create a follow up one with a breaking change.

Checklist

Copy link
Member

@grokys grokys left a comment

Choose a reason for hiding this comment

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

LGTM, I was just about to implement this myself.

Love the new interactive demo in ControlCatalog. I think we can remove the old contents from that page.

@MarchingCube MarchingCube merged commit c3be7ea into AvaloniaUI:master May 13, 2021
@MarchingCube
Copy link
Collaborator Author

When backporting - please include #5918.

danwalmsley pushed a commit that referenced this pull request May 19, 2021
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.

None yet

3 participants