MaterialDesign:HintAssist.Foreground

See original GitHub issue

Bug explanation

It is not possible to change the Color of the materialDesign:HintAssist.Foreground in XAML C# WPF.

Try it out:

                    <ComboBox
                              Margin="30,10,30,0"
                              VerticalAlignment="Top"
                              materialDesign:HintAssist.Foreground="Red"
                              materialDesign:HintAssist.HelperText="Component" />

Version

4.8.1

Issue Analytics

  • State:closed
  • Created 4 months ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MeisterBaumcommented, Jun 7, 2023

But why it is possible to change the opacity of HelperText with materialDesing:HintAssist.Opacity?

That is a great question! It seems there is some misalignment regarding which properties affect what…

Yeah and this is the reason why im so confused about this. I understand that you want to give a Hint and a HelperText. But something here was mixed together. Some Properties are for both and some Properties are only for Hint. This is not really good in my opinion, i would recommend to fix this in the future.

1reaction
MeisterBaumcommented, May 31, 2023

@MeisterBaum So there are 2 string properties on HintAssist which are relevant here. HintAssist.Hint and HintAssist.HelperText. They are sort of similar, but not the same. The hint resides inside of the element (ComboBox in this case), and the helper text is displayed below the element.

The HintAssist.Foreground seems to be used for the HintAssist.Hint and there is not a dedicated property for the foreground of the helper text. However, you can set HintAssist.HelperTextStyle which is a style, and there you can override the Foreground to your liking.

Can you confirm that things work as expected if you take the above into account?

Oh I apologize so much for the misunderstanding. I didn’t know that HintAssist.Foreground is only for Hint. Now that I have implemented your approach, it works without problems. However, it would be much nicer if the ability to change the HelperText color would be possible directly, so that such confusion does not occur.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change a Helpertext (material design) in WPF ...
The HelperText property of HintAssist is not a static property, so you can't change it like that. Insted of that you should use ......
Read more >
materialDesign:HintAssist.Foreground NOT RECOGNIZED
I just pasted the PasswordBox input field from the resource and Visual studio says that 'The member 'Foreground' is not recognized or, ...
Read more >
MaterialDesignTheme.TextBox.xaml
Google's Material Design in XAML & WPF, for C# & VB.Net. - MaterialDesignInXamlToolkit/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.
Read more >
Undrstanding the MVVM pattern - Microsoft Q&A
Hello everyone. I want to get some clarification about MVVM a possibly help me with a WPF app I have this class, witch...
Read more >
Create Modern WPF application using Material Design in ...
And make it look attractive! WPF Login view using Material Design. Let us go step by step on how to create a similar...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found