In this article we will be seeing how to create Silverlight AutoCompleteBox control.Xaml:<sdk:AutoCompleteBox/>Steps Involved:Creating a Silverlight Application:
<Canvas Background="AntiqueWhite" Height="250" Width="250" > <TextBlock Canvas.Left="5" Canvas.Top="10" Text="Autocompltete Control" Foreground="Blue" FontFamily="Arial" FontSize="16" Width="130" FontWeight="Bold"> </TextBlock> <TextBlock x:Name="txtName" Canvas.Left="5" Canvas.Top="60" Text="Enter the Name:" Foreground="Black" FontFamily="Arial" FontSize="16" Width="130"> </TextBlock> <sdk:AutoCompleteBox x:Name="autoComplete" Canvas.Top="60" Height="20" Width="100" Canvas.Left="136" /> </Canvas></UserControl>Open MainPage.xaml.cs file and replace the code with the following.public MainPage() { InitializeComponent(); List<string> names = new List<string>(); names.Add("Anand"); names.Add("Arun"); names.Add("Arjun"); names.Add("Arul"); names.Add("Bala"); names.Add("Balaji"); names.Add("Barani"); names.Add("Buji"); autoComplete.ItemsSource = names; }
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: