If the text box has no keyboard focus and no text, then show italic gray "type here" text "inside" it. How? What doesn't work:
Text property - it messes up data binding.Preferably, I'd like the solution to be as much XAML and as little C# as possible. Perhaps I could create an attached property that would do some magic?
What you're looking for is known as a Watermark. I'm unfamiliar with WPF, but searching WPF & Watermark on "the google" returns a ton of results.
The best solution I've seen till now, is InfoTextBox from Kevin's WPF Bag-o-Tricks library. Check it out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With