Materialdesigninxamltoolkit: Is it possible to change the hint of a textbox in the code behind ?

Created on 6 Jan 2021  路  3Comments  路  Source: MaterialDesignInXAML/MaterialDesignInXamlToolkit

I know I can change the hint of a textbox in the xaml code using
image

I would like to know if it's possible to change the hint using the property in the code behind.

I can't find the hint property in the environment
image

Maybe I have to include something in the code.

I don't know, that's why I'm asking this question.

Thank you.

question

Most helpful comment

Try this:
```c#
using MaterialDesignThemes.Wpf;

HintAssist.SetHint(SampleTextBox, "Awesome hint");
```

All 3 comments

Try this:
```c#
using MaterialDesignThemes.Wpf;

HintAssist.SetHint(SampleTextBox, "Awesome hint");
```

You can also see the relevant WPF docs for it here as well.

Thank you very much !

Was this page helpful?
0 / 5 - 0 ratings