티스토리 뷰
http://www.wpf-tutorial.com/panels/grid-rows-and-columns/
블로그에 나온 내용입니다.
Grid는 쉽게 말해, 자기가 원하는 대로 구역을 나누어 컨트롤을 집어넣을 수 있습니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <Grid> <Grid.RowDefinitions> <RowDefinition Height="30*" /> <RowDefinition Height="20*" /> <RowDefinition Height="30*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="20*" /> <ColumnDefinition Width="20*" /> <ColumnDefinition Width="20*" /> </Grid.ColumnDefinitions> 각 구역마다 row와 column 인덱스를 이용하여 접근할 수 있습니다. 확장된 구역을 원한다면, ColumnSpan, RowSpan을 사용하면 됩니다. <Rectangle Fill="Black" Grid.Row="0" Grid.Column="0" /> <Rectangle Fill="White" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" /> <Rectangle Fill="Yellow" Grid.Row="1" Grid.Column="0" /> <Rectangle Fill="Red" Grid.Row="1" Grid.Column="1" /> <Rectangle Fill="Blue" Grid.Row="1" Grid.Column="2" Grid.RowSpan="2" /> <Rectangle Fill="Silver" Grid.Row="2" Grid.Column="0" /> <Rectangle Fill="Purple" Grid.Row="2" Grid.Column="1" /> </Grid> | cs |
'C# > WPF' 카테고리의 다른 글
WPF tutorial - Introduction to WPF data binding (0) | 2017.06.22 |
---|---|
WPF tutorial - The Grid - GridSplitter, A contact form (0) | 2017.06.22 |
WPF tutorial - The DockPanel (0) | 2017.06.22 |
WPF tutorial - The StackPanel (0) | 2017.06.22 |
WPF tutorial -The WrapPanel (0) | 2017.06.22 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 데이터 바인딩
- CustomCollectionViewCell
- Grid
- 코딩야학
- UIView Animation
- Fakebook
- 백준
- Custom Cell
- 스택
- Cell Animation
- Add TapGesture
- XAML
- 백준온라인
- 생활코딩
- 그래프
- DP
- BFS
- 문자열
- BOJ
- listview
- 타일링
- MVVM
- WPF
- command
- FEED
- dfs
- 객체
- CollectionView
- C++
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
글 보관함