Exemplo n.º 1
0
 protected void SearchBarLostFocus(object sender, RoutedEventArgs e)
 {
     if (SearchBar.Text == "")
     {
         searchBar = "Search";
         SearchBar.GetBindingExpression(TextBox.TextProperty).UpdateTarget();
     }
 }
Exemplo n.º 2
0
 protected void onSearchButtonClick(object sender, RoutedEventArgs e)
 {
     SearchBar.GetBindingExpression(TextBox.TextProperty).UpdateSource();
     if (SearchBar.Text == "Search" && SearchBar.IsFocused == false)
     {
         ItemsContainer.Items.Clear();
         setViewContent();
         return;
     }
     ItemsContainer.Items.Clear();
     filterContent();
 }