Universal Windows Platform – Tutorial Insider – Custom TextBox


comentsys.wordpress.com today features a Universal Windows Platform tutorial showing how to create a Custom TextBox with a customised look-and-feel for the TextBox control.


Within the App.xaml is defined an Application.Resources with a Style of “CustomTextBoxStyle” and a TargetType of TextBox – this example takes a copy of the style for the standard TextBox and customises many of the properties including Foreground set to “Gold”, during the VisualState of PointerOver a BorderBrush has been set to “GoldenRod” and the VisualState of Focused has the BorderBrush set to “Gold”.

The Border has the default BorderBrush set to “Salmon” and the Background to “LightSalmon” with a CornerRadius set to “15” and the ContentPresenter has the Foreground set to “Gold” – some other elements including the Header and DeleteButton have been removed to simplify the TextBox.

Behind the Scenes

This is a straightforward example and Expression Blend was used to create a copy of the standard Style for a TextBox which was then customised with a look-and-feel that’s been used in previous tutorials just to demonstrate how different a standard input control can be modified, more sophisticated customisation is possible – the example is just the start of the idea of creating a completely custom look to an application by modifying controls in this way.

4 thoughts on “Universal Windows Platform – Tutorial Insider – Custom TextBox

    • rogueplanetoid

      I actually have done Windows Mobile 10 development – the links mentioned before for http://comentsys.wordpress.com should work for creating mobile apps as well, you can look up installing the Emulator – it’s one of the options in the Visual Studio 2017 Install settings and you can use this to try out examples like on a phone, or connect a real Windows 10 Mobile device and try them with the Device option from Debug to run them!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s