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

SmartHint "hint text" should affect layout width of TextBox, PasswordBox, etc. #3141

Merged
merged 7 commits into from
Mar 22, 2023

Conversation

nicolaihenriksen
Copy link
Contributor

@nicolaihenriksen nicolaihenriksen commented Mar 17, 2023

Fixes #3124.

This PR sets a Width on the Canvas containing the hint content which matches the width of the hint. This allows the hint to be a determining factor in the layout width of the TextBox.

The Canvas is then wrapped in a Grid which is used to clip the hint in the case where the TextBox is limited in width to something narrower than the actual hint (e.g. MaxWidth set, or something similar). The floating animation (i.e. TranslateTransform) is then moved out of the Canvas and into the Grid instead.

To see this in action, check out the branch and go back to commit 77a3d1a which includes a default demo app page which allows you to play with the various options. That demo page was removed in follow up commits as we agreed it was not something that should be in the demo app going forward, but it was good for testing out the fix.

@nicolaihenriksen nicolaihenriksen changed the title WIP: Hint and helper texts to affect layout width of TextBox SmartHint "hint text" should affect layout width of TextBox, PasswordBox, etc. Mar 21, 2023
@nicolaihenriksen nicolaihenriksen marked this pull request as ready for review March 21, 2023 10:38
@nicolaihenriksen nicolaihenriksen requested a review from Keboo March 21, 2023 10:38
@nicolaihenriksen nicolaihenriksen added this to the 4.9.0 milestone Mar 21, 2023
@Keboo Keboo merged commit b9f0db7 into master Mar 22, 2023
@Keboo Keboo deleted the fix3124 branch March 22, 2023 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HintAssist.Hint text is cut-off
2 participants