Fix items specifying height-only or width-only dimension having wrong proportions - #28
Merged
Merged
Conversation
… proportions Fixes #4, #7. - IconDimensionMultiConverter now accepts three bindings (this dim, other dim, image source). When only one dimension is specified, the other is derived from the image aspect ratio instead of falling back to the raw pixel size. - Fixed the >= 0 guard so an explicit zero-dimension is honoured and does not trigger the proportional-scaling path. - Added FallbackValue=False to BadgeText visibility so it does not flicker visible during binding initialisation. - Changed Button template inner Grid background from Transparent to {x:Null} to avoid a background that consumes hit-test area. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IconDimensionMultiConverternow accepts three bindings: this dimension, the other dimension, and the image source. When only one dimension is specified, the missing dimension is derived from the image aspect ratio rather than falling back to the raw pixel size.> 0to>= 0so an explicit zero-dimension is honoured and doesn't fall into the proportional-scaling path.FallbackValue=Falseto BadgeText visibility binding to prevent flicker during binding initialisation.Transparentto{x:Null}to avoid a background that unnecessarily consumes hit-test area.Test plan
h(height) render at correct proportions instead of being stretched to squarew(width) still render correctly🤖 Generated with Claude Code