Telerik RadControls for Windows Phone – Article #6 – RadAutoCompleteBox

RadAutoCompleteBox is a Autocomplete textbox that is part of the RadControls for Windows Phone . The RadAutoCompleteBox provides a textbox along with additional functionality of providing the suggestion based on the characters the user types in the textbox .

To add the RadAutoCompleteBox to your Windows Phone App , you need to include the following dll’s to your project

  • Telerik.Windows.Core.dll
  • Telerik.Windows.Controls.Input.dll

To add the RadAutoCompleteBox to your Windows Phone Page , you can add the following XAML code to your Windows Phone page

<telerikInput:RadAutoCompleteBox Height="79" Name="radAutoCompleteBox1" Text="TextBox" Width="414" />

If you want to add the RadAutoCompleteBox via Code behind , you can create and instance of RadAutoCompleteBox like the one below

RadAutoCompleteBox radAutoCompleteBox1 = new RadAutoCompleteBox();

You should also add the following namespace in your codebehind file

using Telerik.Windows.Controls;

Now comes the important aspect of the RadAutoCompleteBox – Providing Suggestion .

Once you have added the RadAutoCompleteBox to the Windows Phone Page , you need to set the SuggestionsSource property so that the related suggestions are displayed when the user enters the characters in the textbox .

private ListGetSuggestions()
{
   List MobilePhoneModel = new List();
   MobilePhoneModel.Add("HTC Mozart");
   MobilePhoneModel.Add("HTC HD7");
   MobilePhoneModel.Add("Nokia Lumia 800");
   MobilePhoneModel.Add("Nokia Lumia 710");
   MobilePhoneModel.Add("Nokia Lumia");
   return MobilePhoneModel;
}

radAutoCompleteBox1.SuggestionsSource = GetSuggestions();
Telerik RadControls for Windows Phone – Article #6 – RadAutoCompleteBox - 1
Telerik RadControls for Windows Phone – Article #6 – RadAutoCompleteBox – 1

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you will learn about sync provider notifications in Windows 11 and how to disable or enable it...
In this tutorial, let’s learn how to enable or disable the startup sound in Windows 11. By default, when Windows...
The CameraCaptureTask allows the Windows Phone 7 App to launch the Camera Application . This will be useful when the...