| 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... |
Loading
Wim SturkenboomPosted Nov 23, 2014, 10:49 AM
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.