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
반응형
그리드형(광고전용)
'C# > WPF' 카테고리의 다른 글
[C#/WPF] FlowDocument 엘리먼트 : 유동 컨텐츠 엘리먼트 사용하기 (0) | 2022.12.12 |
---|---|
[C#/WPF] Table 클래스 : RowGroups 속성을 사용해 행 그룹 모두 지우기 (0) | 2022.12.12 |
[C#/WPF] Table 클래스 : RowGroups 속성을 사용해 특정 위치 행 그룹 제거하기 (0) | 2022.12.12 |
[C#/WPF] Table 클래스 : RowGroups 속성을 사용해 특정 행 그룹 제거하기 (0) | 2022.12.12 |
[C#/WPF] Table 클래스 : RowGroups 속성을 사용해 행 그룹 수 구하기 (0) | 2022.12.12 |
[C#/WPF] TableRow 클래스 : Cells 속성을 사용해 셀 추가하기 (0) | 2022.12.12 |
[C#/WPF] TableRowGroup 클래스 : Rows 속성을 사용해 행 속성 설정하기 (0) | 2022.12.12 |
[C#/WPF] TableRowGroup 클래스 : Rows 속성을 사용해 행 추가하기 (0) | 2022.12.12 |
[C#/WPF] Table 클래스 : RowGroups 속성을 사용해 첫 번째 행 그룹 앞에 행 그룹 삽입하기 (0) | 2022.12.12 |
[C#/WPF] Table 클래스 : RowGroups 속성을 사용해 행 그룹 추가하기 (0) | 2022.12.12 |
댓글을 달아 주세요