[SmartHint] Fix hint placement when ComboBox toggles between single-line and multi-line selection #3690
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.
Fixes #3675
This is the remaining fix for the issue above. This is regarding the hint in the
ComboBoxnot moving accordingly when the "selected content" changes from a single line element to a multi-line element.The fundemental issue is that the converter in the
SmartHintneeds some knowledge about when the "host element" changes is size. This is not directly available via theSmartHint.HintProxyabstraction, and therefore I have added aSmartHint.HintHostwhich is essentially pointing to the same element, but not hidden behind an abstraction. As we've discussed, we could phase out the use ofIHintProxyand replace with theSmartHint.HintHostinstead (with some supporting methods).HintHost.ActualWidthandHintHost.ActualHeighthave both been added as "trigger bindings" to the converter calculating the hint position (the values are not used; they simply re-trigger the calculation)