-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Aspect Ratio: Add implicit converter for integer #4321
New issue
Have a question about this project? Sign up for a free GitHub account 8000 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
Aspect Ratio: Add implicit converter for integer #4321
Conversation
Thanks XAML-Knight for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
<Project>{84ab7dc5-95c9-4cf8-a370-d077e9e9ef1a}</Project> | ||
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Primitives</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\..\Microsoft.Toolkit.Uwp.UI.Controls\Microsoft.Toolkit.Uwp.UI.Controls.csproj"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't need the controls package here as it just contains all the other packages (it has nothing in it itself).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
Fixes #4241
PR Type
If you try and bind an
int
value to theAspectRatio
of theConstrainedBox
then it won't convert as it can't cast it to double... Should provide implicit converters forint
in addition todouble
to help this scenario where you want aN:1
aspect ratio, whereN
is anint
.What is the new behavior?
Bind to an integer value and have it converted to an Aspect Ratio correctly.
PR Checklist
Please check if your PR fulfills the following requirements:
Other information
Also, #4307