Skip to content

[SmartHint] Add opt-in AP to control hint padding brush#3701

Merged
Keboo merged 11 commits intomasterfrom
fix3700
Oct 24, 2024
Merged

[SmartHint] Add opt-in AP to control hint padding brush#3701
Keboo merged 11 commits intomasterfrom
fix3700

Conversation

@nicolaihenriksen
Copy link
Contributor

Fixes #3700
Fixes #3262

If applying a custom background, the MaterialDesignOutlinedTextBox style by default uses the MDIX window background brushes for the "padding" on the hint (used to "erase" some of the outline border).

This PR introduces an opt-in AP which allows consumers to override this to match their custom background.

In principle, a PriorityBinding should suffice for this in the SmartHint style, but yet again I was unable to make it work 😞 Thus I went for the converter approach I have ended up with before. Apparently I am not great friends with the PriorityBinding.

For a more detailed explanation of the issue, see my comment here: #3262 (comment)

Before

HintAssist.Background left at default value (Transparent):
image

HintAssist.Background set to match background:
image

After

HintAssist.Background not needed unless you want a custom background on the hint (floating and non-floating)
image

nicolaihenriksen and others added 2 commits October 20, 2024 09:25
Co-authored-by: Kevin B <Keboo@users.noreply.github.com>
@nicolaihenriksen nicolaihenriksen added this to the 5.2.0 milestone Oct 20, 2024
@Keboo Keboo merged commit f13c495 into master Oct 24, 2024
@Keboo Keboo deleted the fix3700 branch October 24, 2024 05:45
JLdgu pushed a commit to JLdgu/MaterialDesignInXamlToolkit that referenced this pull request Nov 8, 2024
…gnInXAML#3701)

* Add AP to use for padding brush

* Apply AP in SmartHint style

* Forward AP and remove no longer needed trigger in TextBox style

* Apply AP fix in AutoSuggestBox style

* Apply AP fix in PasswordBox style

* Apply AP fix in ComboBox style

* Apply AP fix in DatePicker style

* Apply AP fix in TimePicker style

* Add showcasing of AP to demo apps

* Adjust UI tests

* Update src/MaterialDesignThemes.Wpf/HintAssist.cs

Co-authored-by: Kevin B <Keboo@users.noreply.github.com>

---------

Co-authored-by: Kevin B <Keboo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants