첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

■ TableRow 클래스의 Cells 속성을 사용해 셀 속성을 설정하는 방법을 보여준다.

 

▶ 예제 코드 (C#)

using System.Windows;
using System.Windows.Documents;
using System.Windows.Media;

Table table = new Table();

for(int i = 0; i < 4; i++)
{
    table.RowGroups.Add(new TableRowGroup());
}

TableRowGroup tableRowGroup = table.RowGroups[0];

for(int i = 0; i < 10; i++)
{
    tableRowGroup.Rows.Add(new TableRow());
}

TableRow tableRow = tableRowGroup.Rows[0];

for(int i = 0; i < 10; i++)
{
    tableRow.Cells.Add(new TableCell(new Paragraph(new Run("Cell " + (i + 1)))));
}

tableRow.Cells[0].Background = Brushes.PapayaWhip;
tableRow.Cells[1].FontStyle  = FontStyles.Italic;

tableRow.Cells[2].Blocks.Clear();
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요