我加载了一个字符串列表ListBox,现在我想在我输入文本时过滤它TextBox.我该怎么做?
public void ListLoad()
{
ElementList = new List<string>(); // creation a list of strings
ElementList.Add("1"); // add a item of string
ElementList.Add("2"); // add a item of string
DataContext = this; // set the data context
}
Run Code Online (Sandbox Code Playgroud)
我在XAML中绑定它:
ItemsSource ="{Binding ElementList}"