Telerik UI for Windows Phone by Progress

This topic demonstrates how to start using RadTextBox for Windows Phone.

To start using RadTextBox, the first thing that has to be done is adding references to the required assemblies:

  • Telerik.Windows.Core.dll
  • Telerik.Windows.Controls.Primitives.dll

Then, the following namespace has to be declared:

CopyXAML
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"

Here is how RadTextBox is declared in XAML:

CopyXAML
<telerikPrimitives:RadTextBox x:Name="radTextBox" />

And in C#:

CopyC#
RadTextBox radTextBox = new RadTextBox();

You can easily add an action button by setting the ActionButtonVisibility property to Visible and then you can use a command with the ActionButtonCommand property or subscribe to the ActionButtonTap event and perform your logic for the action button. Here is how RadTextBox looks with the default style for the ActionButton:

Text Box-Default Look
Note

Please note that there is also a ClearButton that clears all the text from the text box, but it appears only after you start typing in the RadTextBox.