Google WindowsPhone Store 8.1 vs WindowsPhone 8: TextBox control having "Header" and "PlaceholderText" Properties(C#-XAML) | SubramanyamRaju Xamarin & Windows App Dev Tutorials

Sunday, 4 May 2014

WindowsPhone Store 8.1 vs WindowsPhone 8: TextBox control having "Header" and "PlaceholderText" Properties(C#-XAML)


The TextBox control in Windows Phone 8.1 SDK supports setting Header text. You can also modify the header template to place explicit content and/or design it as per your need. This was asked by many developers to provide in the default control, as some third party libraries already provide this feature.

Building the Sample

  • Make sure you’ve downloaded and installed the Windows Phone SDK. For more information, see Get the SDK.
  • I assumes that you’re going to test your app on the Windows Phone emulator. If you want to test your app on a phone, you have to take some additional steps. For more info, see Register your Windows Phone device for development.
  • This post assumes you’re using Microsoft Visual Studio Express 2013 for Windows.


Windows Phone 8.1 TextBox is also supports “PlaceholderText”, that means, you can now set Watermarked Text in your TextBox control. This was also part of some third party library vendors but was somehow missing in Windows Phone SDK. As these are now available directly in your default control, you can now use this without any additional cost or design efforts.
Here is the code snippet for you to try out the additional features part of Windows Phone 8.1 SDK:
 <StackPanel Margin="10">
    <TextBox Header="Header"/>
    <TextBox Header="Custom Header">
                <TextBlock Text="{Binding}" FontSize="18" Foreground="Yellow"/>
    <TextBox Header="Spell Check Enabled" IsSpellCheckEnabled="True"/>
    <TextBox Header="Spell Check Disabled" IsSpellCheckEnabled="False"/>
    <TextBox Header="Text Prediction Enabled" IsTextPredictionEnabled="True"/>
    <TextBox Header="Text Prediction Disabled" IsTextPredictionEnabled="False"/>
    <TextBox Header="Place Holder Text" PlaceholderText="Watermarked text"/>
Additionally, you can also add/remove support for SpellChecker, Text Predictions etc. while using TextBox control in your apps or games. You can see below how the Spell Checker and TextPrediction works:

Output Screens:




Note: WindowsPhone 8.0 TextBox control doesn't support above properties.

Note: Please share your thoughts,what you think about this post,Is this post really helpful for you?otherwise it would be very happy ,if you have any thoughts for to implement this requirement in any another way?I always welcome if you drop comments on this post and it would be impressive.

Follow me always at  

Have a nice day by  :)


  1. Hi Subbu,

    Is there any way we can write this header template somewhere and and use it for text boxes everywhere across the application?


  2. Wow! these are wonderful tips. Thanks for sharing them with us. Please visit


Search Engine Submission - AddMe