dotnetpro.WPF.TableReport.ReportPresenter.GenerateCell C# (CSharp) Метод

GenerateCell() приватный Метод

private GenerateCell ( string sValue, ColumnDefinition colDef, System.Windows.Thickness borders, int row, int col, SolidColorBrush brush ) : void
sValue string
colDef ColumnDefinition
borders System.Windows.Thickness
row int
col int
brush System.Windows.Media.SolidColorBrush
Результат void
        private void GenerateCell(string sValue, ColumnDefinition colDef, Thickness borders, int row, int col, SolidColorBrush brush)
        {
            Border oCell = new Border();

            oCell.BorderBrush = Brushes.Black;
            oCell.BorderThickness = borders;

            if (brush == null)
            {
                oCell.Background = Brushes.White;
                oCell.SetBackground(HasAlternatingRows, row);
            }
            else
                oCell.Background = brush;

            oTable.Children.Add(oCell);
            oCell.Add2Grid(col, row);

            TextBlock text = new TextBlock(new Run(sValue));
            text.TextWrapping = TextWrapping.NoWrap;
            text.TextTrimming = TextTrimming.CharacterEllipsis;
            text.Margin = new Thickness(2, 0, 2, 0);
            
            //Zeigen
            text.TextAlignment = colDef.Alignment;
                        
            oCell.Child = text;
        }