Create WPF Watermark in Pure XAML

前端 未结 3 955
-上瘾入骨i
-上瘾入骨i 2020-12-10 09:16

This is for a TextBox control on a login screen, where the TextBox contains the username. I want the TextBox to perform in the following way:

  • When the conte

3条回答
  •  一生所求
    2020-12-10 09:30

    The Extended WPF Toolkit has a Watermark Textbox that will do just what you're asking in pure XAML. There are other libraries out there as well.

    The good thing about using the Extended WPF Toolkit is you can pick it up on Nuget and install and install updates directly through Visual Studio.

提交回复
热议问题