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

Grid grid = new Grid();

grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });

grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });

Button button = new Button();

button.Content = "button";

Grid.SetRow   (button, 1);
Grid.SetColumn(button, 1);

grid.Children.Add(button);

int row    = Grid.GetRow   (button);
int column = Grid.GetColumn(button);
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요