Propagate HintAssist.Background into TimePicker and DatePicker #3367
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.
Should eventually fix #3365
This PR originates from a discussion topic where a MDIX consumer was trying to set
HintAssist.Background
for theTimePicker
but the value was not propagating through.The PR now propagates the value through and is applied as the background of the
Border
containing the hint. The background property has always been set to the value of the attached property, but it has just never been propagated through and therefore had no effect. Because the background setter is using the attached property, my assumption is that the original intention has been to propagate it through.The OP of the discussion topic needed it for the outlined style, but I assume it should be applied for all the styles.
It does, in my opinion, look somewhat wacky, but at least there is now an opt-in opportunity to actually change it if you so desire. Note that there is also an opacity difference between the styles. I am wondering whether that is desirable.
Also note that there is special handling of the outlined style when the hint is floating. For the "standard" control it changes from
Transparent
to the theme background color in order to "mask out" the outline which it covers. I had to introduce a converter to make sure this only falls back to the theme background in the case where the attached property is set to its default value. Any other value than the default will not cause a fallback to the theme background. I also added special UI tests covering this particular case (both default and non-default).