private void Label_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            FilterEditControl filterControl = new FilterEditControl();
            Label             label         = (Label)e.Source;
            CamlFilter        filter        = (CamlFilter)label.Tag;

            filterControl.Initialize(SourceFields, filter);
            if (filterControl.ShowDialog(null, "Filter") == true)
            {
                label.Content = filter.ToCaml();
            }
        }
        private void AddFilterButton_Click(object sender, RoutedEventArgs e)
        {
            FilterEditControl filterControl = new FilterEditControl();
            MenuItem          menuItem      = (MenuItem)e.Source;
            //ItemCollection items = (ItemCollection)button.DataContext;
            CamlFilters parentFilters = (CamlFilters)menuItem.Tag;

            CamlFilter filter = new CamlFilter();

            filterControl.Initialize(SourceFields, filter);

            if (filterControl.ShowDialog(null, "Filter") == true)
            {
                parentFilters.Filters.Add(filter);
                PopulateFilters();

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