예제 #1
0
        private void text_filter_TextChanged(object sender, TextChangedEventArgs e)
        {
            WaterMarkAdorner.SetIsWaterMarkHost(text_Filter, text_Filter.Text.Length == 0);
            var filterText = text_Filter.Text;
            var filter     = string.IsNullOrWhiteSpace(filterText) ? null : new Predicate <object>(x =>
            {
                var row = x as DataBoxRow;
                foreach (var item in row.Row.ItemArray)
                {
                    if (item != null && item.ToString().Contains(filterText))
                    {
                        return(true);
                    }
                }
                return(false);
            });

            if (!IsShowPager)
            {
                dg_Host.Items.Filter = filter;
            }
            else
            {
                rows.Filter = filter;
                ResetPager();
            }
            SetCheckedAllState();
        }
예제 #2
0
 internal void CheckWaterMark()
 {
     WaterMarkAdorner.SetIsWaterMarkHost(tb_Host, this.IsVisible && this.IsEnabled && this.IsKeyboardFocusWithin && tb_Host.Text.Length == 0);
 }