Пример #1
0
        static void OnSearchEventTimeDelayChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            SearchTextBox stb = o as SearchTextBox;

            if (stb != null)
            {
                stb._searchEventDelayTimer.Interval = ((Duration)e.NewValue).TimeSpan;
                stb._searchEventDelayTimer.Stop();
            }
        }
Пример #2
0
        private void Search_OnSearch(object sender, RoutedEventArgs e)
        {
            SearchTextBox  searchTextBox  = (SearchTextBox)sender;
            SwagData       swagData       = (SwagData)((SwagTabItem)searchTextBox.DataContext).ViewModel;
            SwagDataResult swagDataResult = SwagDataTable.Search(searchTextBox.Text, searchTextBox.FilterMode,
                                                                 (sdc, sdr, searchValue, filterMode) =>
            {
                String compareTarget = sdr.DataRow[sdc.ColumnName].ToString();
                String compareValue  = searchValue;
                return(SearchHelper.Evaluate(compareTarget, compareValue, false, filterMode, false));
            });

            swagData.SwagDataResult = swagDataResult;
        }
Пример #3
0
        private static void TextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SearchTextBox stb = d as SearchTextBox;

            stb.OnPropertyChanged("Text");
        }