public FilterControl()
        {
            Grid grdLayoutRoot = new Grid();

            grdLayoutRoot.RowDefinitions.Add(new RowDefinition(){ Height = GridLength.Auto });
            grdLayoutRoot.RowDefinitions.Add(new RowDefinition(){ Height = GridLength.Auto });
            grdLayoutRoot.RowDefinitions.Add(new RowDefinition(){ Height = GridLength.Auto });
            grdLayoutRoot.RowDefinitions.Add(new RowDefinition(){ Height = GridLength.Auto });

            grdLayoutRoot.ColumnDefinitions.Add(new ColumnDefinition());

            Grid grdFilterType = new Grid();
            grdFilterType.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
            grdFilterType.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(200) });
            grdFilterType.ColumnDefinitions.Add(new ColumnDefinition());
            // Заголовок
            TextBlock lblFilterType = new TextBlock() { VerticalAlignment = VerticalAlignment.Center, Text = Localization.FilterControl_Label_FilterType, Margin = new Thickness(0, 0, 0, 0) };
            grdFilterType.Children.Add(lblFilterType);
            Grid.SetRow(lblFilterType, 0);
            Grid.SetColumn(lblFilterType, 0);

            // Выбор типа фильтра
            comboFilterFamily = new FilterFamilyCombo() { Margin = new Thickness(5,0,0,0) };
            comboFilterFamily.SelectionChanged += new EventHandler(comboFilterFamily_SelectionChanged);
            grdFilterType.Children.Add(comboFilterFamily);
            Grid.SetRow(comboFilterFamily, 0);
            Grid.SetColumn(comboFilterFamily, 1);

            grdLayoutRoot.Children.Add(grdFilterType);
            Grid.SetRow(grdFilterType, 0);

            // Заголовок
            TextBlock lblFilterSettings = new TextBlock() { Text = Localization.FilterControl_Label_FilterSettings, Margin = new Thickness(0, 5, 0, 3) };
            grdLayoutRoot.Children.Add(lblFilterSettings);
            Grid.SetRow(lblFilterSettings, 2);

            // Фильтр
            grdFilterContainer = new Grid();
            grdLayoutRoot.Children.Add(grdFilterContainer);
            Grid.SetRow(grdFilterContainer, 3);

            this.Content = grdLayoutRoot;
            this.IsEnabledChanged += new DependencyPropertyChangedEventHandler(FilterControl_IsEnabledChanged);
            BuildFilter();
        }
        public FilterControl()
        {
            Grid grdLayoutRoot = new Grid();

            grdLayoutRoot.RowDefinitions.Add(new RowDefinition()
            {
                Height = GridLength.Auto
            });
            grdLayoutRoot.RowDefinitions.Add(new RowDefinition()
            {
                Height = GridLength.Auto
            });
            grdLayoutRoot.RowDefinitions.Add(new RowDefinition()
            {
                Height = GridLength.Auto
            });
            grdLayoutRoot.RowDefinitions.Add(new RowDefinition()
            {
                Height = GridLength.Auto
            });

            grdLayoutRoot.ColumnDefinitions.Add(new ColumnDefinition());

            Grid grdFilterType = new Grid();

            grdFilterType.ColumnDefinitions.Add(new ColumnDefinition()
            {
                Width = GridLength.Auto
            });
            grdFilterType.ColumnDefinitions.Add(new ColumnDefinition()
            {
                Width = new GridLength(200)
            });
            grdFilterType.ColumnDefinitions.Add(new ColumnDefinition());
            // Заголовок
            TextBlock lblFilterType = new TextBlock()
            {
                VerticalAlignment = VerticalAlignment.Center, Text = Localization.FilterControl_Label_FilterType, Margin = new Thickness(0, 0, 0, 0)
            };

            grdFilterType.Children.Add(lblFilterType);
            Grid.SetRow(lblFilterType, 0);
            Grid.SetColumn(lblFilterType, 0);

            // Выбор типа фильтра
            comboFilterFamily = new FilterFamilyCombo()
            {
                Margin = new Thickness(5, 0, 0, 0)
            };
            comboFilterFamily.SelectionChanged += new EventHandler(comboFilterFamily_SelectionChanged);
            grdFilterType.Children.Add(comboFilterFamily);
            Grid.SetRow(comboFilterFamily, 0);
            Grid.SetColumn(comboFilterFamily, 1);

            grdLayoutRoot.Children.Add(grdFilterType);
            Grid.SetRow(grdFilterType, 0);

            // Заголовок
            TextBlock lblFilterSettings = new TextBlock()
            {
                Text = Localization.FilterControl_Label_FilterSettings, Margin = new Thickness(0, 5, 0, 3)
            };

            grdLayoutRoot.Children.Add(lblFilterSettings);
            Grid.SetRow(lblFilterSettings, 2);

            // Фильтр
            grdFilterContainer = new Grid();
            grdLayoutRoot.Children.Add(grdFilterContainer);
            Grid.SetRow(grdFilterContainer, 3);

            this.Content           = grdLayoutRoot;
            this.IsEnabledChanged += new DependencyPropertyChangedEventHandler(FilterControl_IsEnabledChanged);
            BuildFilter();
        }