Place holder or watermark in TextBox windows 8

后端 未结 5 1010
既然无缘
既然无缘 2021-01-08 00:38

I want to show a placeholder text in TextBox when user hasn\'t typed anything and TextBox is idle.

In Andriod it can be done using a

5条回答
  •  失恋的感觉
    2021-01-08 01:18

    The WinRT Xaml Toolkit has a WatermarkTextbox Control: http://winrtxamltoolkit.codeplex.com/

    You can get it via NuGet as well, it comes with several other usefull Controls.

    you can use it by referncing the toolkit in your Page´s property´s:

    xmlns:xtk="using:WinRTXamlToolkit.Controls"
    

    And the just access the WaterMarkTextBox like this:

    
    

    Edit.:

    Callisto offers a watermark TextBox too: https://github.com/timheuer/callisto

    Its just not mentioned in the readme yet.

提交回复
热议问题