public LabelFilterControl()
        {
            Grid LayoutRoot = new Grid();

            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(2, GridUnitType.Star) });
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(2, GridUnitType.Star) });
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition());
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition());

            LayoutRoot.RowDefinitions.Add(new RowDefinition());
            LayoutRoot.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(24) });
            LayoutRoot.RowDefinitions.Add(new RowDefinition());

            // Мера куба
            comboLevelProperty = new LevelPropertyCombo() { Margin = new Thickness(0) };
            LayoutRoot.Children.Add(comboLevelProperty);
            Grid.SetColumn(comboLevelProperty, 0);
            Grid.SetRow(comboLevelProperty, 1);

            // Тип фильтра
            comboFilterType = new LabelFilterTypeCombo() { Margin = new Thickness(5, 0, 0, 0) };
            comboFilterType.SelectionChanged += new SelectionChangedEventHandler(comboFilterType_SelectionChanged);
            LayoutRoot.Children.Add(comboFilterType);
            Grid.SetRow(comboFilterType, 1);
            Grid.SetColumn(comboFilterType, 1);

            // Текстовое поле
            text_1 = new RichTextBox() { Margin = new Thickness(5,0,0,0), Text = String.Empty };
            LayoutRoot.Children.Add(text_1);
            Grid.SetRow(text_1, 1);
            Grid.SetColumn(text_1, 2);

            // Текст "и"
            lblAnd = new TextBlock() { Text = Localization.Filter_Label_And, TextAlignment = TextAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom, Margin = new Thickness(5, 0, 0, 0) };
            LayoutRoot.Children.Add(lblAnd);
            Grid.SetColumn(lblAnd, 3);
            Grid.SetRow(lblAnd, 1);

            // Текстовое поле
            text_2 = new RichTextBox() { Margin = new Thickness(5, 0, 0, 0), Text = String.Empty };
            LayoutRoot.Children.Add(text_2);
            Grid.SetRow(text_2, 1);
            Grid.SetColumn(text_2, 4);

            this.Content = LayoutRoot;

            Refresh();
        }
Пример #2
0
        public LabelFilterControl()
        {
            Grid LayoutRoot = new Grid();

            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition()
            {
                Width = new GridLength(2, GridUnitType.Star)
            });
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition()
            {
                Width = new GridLength(2, GridUnitType.Star)
            });
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition());
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition()
            {
                Width = GridLength.Auto
            });
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition());

            LayoutRoot.RowDefinitions.Add(new RowDefinition());
            LayoutRoot.RowDefinitions.Add(new RowDefinition()
            {
                Height = new GridLength(24)
            });
            LayoutRoot.RowDefinitions.Add(new RowDefinition());

            // Мера куба
            comboLevelProperty = new LevelPropertyCombo()
            {
                Margin = new Thickness(0)
            };
            LayoutRoot.Children.Add(comboLevelProperty);
            Grid.SetColumn(comboLevelProperty, 0);
            Grid.SetRow(comboLevelProperty, 1);

            // Тип фильтра
            comboFilterType = new LabelFilterTypeCombo()
            {
                Margin = new Thickness(5, 0, 0, 0)
            };
            comboFilterType.SelectionChanged += new SelectionChangedEventHandler(comboFilterType_SelectionChanged);
            LayoutRoot.Children.Add(comboFilterType);
            Grid.SetRow(comboFilterType, 1);
            Grid.SetColumn(comboFilterType, 1);

            // Текстовое поле
            text_1 = new RichTextBox()
            {
                Margin = new Thickness(5, 0, 0, 0), Text = String.Empty
            };
            LayoutRoot.Children.Add(text_1);
            Grid.SetRow(text_1, 1);
            Grid.SetColumn(text_1, 2);

            // Текст "и"
            lblAnd = new TextBlock()
            {
                Text = Localization.Filter_Label_And, TextAlignment = TextAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom, Margin = new Thickness(5, 0, 0, 0)
            };
            LayoutRoot.Children.Add(lblAnd);
            Grid.SetColumn(lblAnd, 3);
            Grid.SetRow(lblAnd, 1);

            // Текстовое поле
            text_2 = new RichTextBox()
            {
                Margin = new Thickness(5, 0, 0, 0), Text = String.Empty
            };
            LayoutRoot.Children.Add(text_2);
            Grid.SetRow(text_2, 1);
            Grid.SetColumn(text_2, 4);

            this.Content = LayoutRoot;

            Refresh();
        }