private void RootTreeViewItem_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            FilterGroupEditControl filterControl = new FilterGroupEditControl();
            TreeViewItem           tvi           = (TreeViewItem)e.Source;
            CamlFilters            filters       = (CamlFilters)tvi.Tag;

            filterControl.Initialize(filters);
            if (filterControl.ShowDialog(null, "Filter") == true)
            {
                tvi.Header = filters.IsOr ? "OR" : "AND";
            }
        }
        private void AddGroupButton_Click(object sender, RoutedEventArgs e)
        {
            FilterGroupEditControl filterControl = new FilterGroupEditControl();
            Button         button        = (Button)e.Source;
            ItemCollection items         = (ItemCollection)button.DataContext;
            CamlFilters    parentFilters = (CamlFilters)button.Tag;

            CamlFilters filters = new CamlFilters();

            filterControl.Initialize(filters);
            if (filterControl.ShowDialog(null, "Filter") == true)
            {
                parentFilters.FilterCollections.Add(filters);
                PopulateFilters();

                /*
                 * items.Clear();
                 * PopulateFilters(items, parentFilters);
                 */
            }
        }