示例#1
0
        public static bool Open(Window owner, ref Filter obj)
        {
            Window win = new FilterWindow()
            {
                DataContext = obj,
                Owner       = owner,
            };

            win.ShowDialog();
            return(win.DialogResult == true ? true : false);
        }
示例#2
0
        private void OnShowFilter(object sender, RoutedEventArgs _)
        {
            CollectionViewSource src = (CollectionViewSource)Resources["entries"];

            bool ok = FilterWindow.Open(this, ref filter);

            src.View.Filter = null;
            if (ok)
            {
                src.View.Filter = filter.Keep;
            }
        }