■ Table 클래스의 Columns 속성을 사용해 컬럼 속성을 설정하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
using System.Windows.Documents; using System.Windows.Media; Table table = new Table(); for(int i = 0; i < 4; i++) { table.Columns.Add(new TableColumn()); } table.Columns[0].Width = new GridLength(20); table.Columns[1].Background = Brushes.AliceBlue; table.Columns[2].Width = new GridLength(20); table.Columns[3].Background = Brushes.AliceBlue; |