Click here to Skip to main content
15,885,868 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Just started programming with Windows phone 8 a litle bit today.
I have been googling for resources/ samples but I am unable to do the following:

How can I insert a search box in the UI of my app

Some articles say I should just put in the SearchBox tag in my XAML, but its not getting recognised.
What do I need to do? :(

(I know i need to somehow use Windows.UI.Xaml.Controls namespace, but how do I do this in XAML?

When I try to compile, I get the following error;
"SearchBox" does not exist in the namespace "http://schemas.microsoft.com/client/2007"

)
Posted
Updated 26-May-14 8:18am
v3
Comments
[no name] 26-May-14 17:38pm    
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868180.aspx

1 solution

you need add Microsoft.Phone.Controls.Toolkit nuget package and add the below namespace to your page where you want search box

xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"



please find the below control paste it in your page and check


<toolkit:PhoneTextBox  Background="Gray" VerticalAlignment="Top" BorderThickness="1" Padding="2" BorderBrush="Red"  x:Name="txtSearchText" TextWrapping="Wrap" Hint="search here" InputScope="Chat"  AcceptsReturn="False" FontSize="21.333" FontFamily="Segoe WP SemiLight"  />



hope this helps.

let me know if you it is not working
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900