protected override void BuildTemplate(TemplateBuilder builder)
            {
                var columns        = Columns;
                var sortDirections = SortDirections;

                builder.GridRows("Auto", "Auto")
                .GridColumns("20", "*", "*", "100", "*")
                .GridLineX(new GridPoint(1, 1), 4).GridLineX(new GridPoint(1, 2), 4)
                .Layout(Orientation.Vertical)
                .WithVirtualRowPlacement(VirtualRowPlacement.Tail)
                .AddBinding(1, 0, this.BindToTextBlock(_.Column.DisplayName))
                .AddBinding(2, 0, this.BindToTextBlock(_.Mounter.DisplayName))
                .AddBinding(3, 0, this.BindToTextBlock(_.SortDirection.DisplayName))
                .AddBinding(4, 0, this.BindToTextBlock(_.ConstructorParamName.DisplayName))
                .AddBinding(0, 1, _.BindToRowHeader().WithStyle(RowHeader.Styles.Flat))
                .AddBinding(1, 1, _.Column.BindToComboBox(columns))
                .AddBinding(2, 1, _.Mounter.BindToTextBlock())
                .AddBinding(3, 1, _.SortDirection.BindToComboBox(sortDirections).ApplyRefresh(RefreshIsEnabled))
                .AddBinding(4, 1, _.ConstructorParamName.BindToTextBox().ApplyRefresh(RefreshIsEnabled))
                .AddBinding(_window._textBoxName, _pkTypeName.BindToTextBox())
                .AddBinding(_window._checkBoxKey, _shouldCreateKey.BindToCheckBox())
                .AddBinding(_window._textBoxKey, _keyTypeName.BindToTextBox().ApplyRefresh((v, p) => v.IsEnabled = ShouldCreateKey))
                .AddBinding(_window._checkBoxRef, _shouldCreateRef.BindToCheckBox())
                .AddBinding(_window._textBoxRef, _refTypeName.BindToTextBox().ApplyRefresh((v, p) => v.IsEnabled = ShouldCreateRef));
            }
Exemplo n.º 2
0
            protected override void BuildTemplate(TemplateBuilder builder)
            {
                var textColumns = _.TextColumns;

                builder.GridColumns(textColumns.Select(x => "100;min:20;max:200").ToArray())
                .GridRows("Auto", "Auto", "Auto")
                .Layout(Orientation.Vertical)
                .WithFrozenTop(2);

                for (int i = 0; i < _columnHeadings.Length; i++)
                {
                    builder.AddBinding(i, 0, _bindableColumnHeadings[i].BindToColumnHeader());
                }

                for (int i = 0; i < _columnMappings.Length; i++)
                {
                    builder.AddBinding(i, 1, _columnMappings[i].BindToComboBox(_columnSelections, nameof(ColumnSelection.Column), nameof(ColumnSelection.Display)));
                }

                for (int i = 0; i < textColumns.Count; i++)
                {
                    var textBlockGrayOut = new TextBlockGrayOut(_columnMappings[i]);
                    var textColumn       = textColumns[i];
                    var gridCellBinding  = textColumn.BindToTextBlock().ApplyRefresh(textBlockGrayOut.Refresh).AddToGridCell();
                    builder.AddBinding(i, 2, textColumn.BindToValidationPlaceholder(gridCellBinding));
                    builder.AddBinding(i, 2, gridCellBinding);
                    builder.GridLineY(new GridPoint(i + 1, 2), 1);
                }

                builder.AddBinding(_checkBoxFirstRowContainsRowHeaders, BindableFirstRowContainsColumnHeadings.BindToCheckBox());

                builder.GridLineX(new GridPoint(0, 3), textColumns.Count);
            }
Exemplo n.º 3
0
            protected override void BuildTemplate(TemplateBuilder builder)
            {
                base.BuildTemplate(builder);

                builder.AddBinding(_uiParams.Unique, _isUnique.BindToCheckBox())
                .AddBinding(_uiParams.Table, _isValidOnTable.BindToCheckBox())
                .AddBinding(_uiParams.TempTable, _isValidOnTempTable.BindToCheckBox());
            }
 protected override void BuildTemplate(TemplateBuilder builder)
 {
     builder
     .GridRows("Auto", "Auto")
     .GridColumns("5*", "4*")
     .GridLineX(new GridPoint(0, 2), 1)
     .Layout(Orientation.Vertical)
     .WithFrozenTop(1)
     .AddBinding(_window._comboBoxDbSessionProvider, _dbSessionProvider.BindToComboBox(DbSessionProviderTypeSelection))
     .AddBinding(_window._checkBoxShowDbLog, _showDbLog.BindToCheckBox())
     .AddBinding(0, 0, _.DataSetMethod.BindToColumnHeader())
     .AddBinding(1, 0, _.DbTableProperty.BindToColumnHeader())
     .AddBinding(0, 1, _.DataSetMethod.BindToTextBlock(p => string.Format("{0}()", p.GetValue(_.DataSetMethod).Name)))
     .AddBinding(1, 1, _.DbTableProperty.BindToComboBox(_.DbTablePropertySelection));
 }
Exemplo n.º 5
0
 protected override void BuildTemplate(TemplateBuilder builder)
 {
     builder
     .AddBinding(_window._checkBoxShowLog, _showLog.BindToCheckBox());
 }
Exemplo n.º 6
0
 protected override void BuildTemplate(TemplateBuilder builder)
 {
     builder
     .AddBinding(_window._comboBoxDbSessionProvider, _dbSessionProvider.BindToComboBox(DbSessionProviderTypeSelection))
     .AddBinding(_window._checkBoxShowLog, _showLog.BindToCheckBox());
 }