IEnumerable table1 = richTextBox1.Document.Blocks.OfType<Table>(); foreach (Table tb1 in table1) { for (int i = 0; i < tb1.RowGroups[0].Rows.Count; ++i) { TableRow currentRow = tb1.RowGroups[0].Rows[i]; var brushConverter = new BrushConverter(); currentRow.Background = (Brush)brushConverter.ConvertFrom("#FFe2e2e2"); // grey background currentRow.Foreground = (Brush)brushConverter.ConvertFrom("#FF000000"); // black text // currentRow.FontWeight = FontWeights.UltraBold; currentRow.FontFamily = new FontFamily("Arial Black"); currentRow.FontSize = 16.0; currentRow.FontStretch = FontStretches.UltraExpanded; currentRow.FontStyle = FontStyles.Italic; currentRow.FontWeight = FontWeights.UltraBold; //currentRow.FontWeight = FontWeights.Bold; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)