| I am making an app that has many buttons on mainpage user have to press one of them but i want to put a search box in which user enter some text and related button is suggested to the user. PLZ help me how to implement this task in windows phone in C#. Thank you in advance... |
Suggesting button according to data enter in search box
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Wim SturkenboomRank #2,527 · 554 reputationPosted Nov 23, 2014, 5:49 AM EST
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
Dictionary
public Form1()
{
InitializeComponent();
lookup.Add("abc", button1);
lookup.Add("def", button2);
lookup.Add("xyz", button3);
lookup.Add("123", button1);
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (lookup.ContainsKey(textBox1.Text))
{
lookup[textBox1.Text].Focus();
}
}
}
}
Hope this can be a base for what you need.