GridUnitType 열거형
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
GridLength 개체가 보유하는 값의 종류를 설명합니다.
public enum class GridUnitType
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class GridUnitType
C#
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum GridUnitType
Public Enum GridUnitType
XAML
<object property="enumMemberName"/>
- 상속
-
GridUnitType
- 특성
디바이스 패밀리 |
Windows 10 (10.0.10240.0에서 도입되었습니다.)
|
API contract |
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)
|
Name | 값 | Description |
---|---|---|
Auto | 0 | 크기가 콘텐츠 개체의 크기 속성에 따라 결정됩니다. |
Pixel | 1 | 값은 픽셀로 표현됩니다. |
Star | 2 | 값이 사용 가능한 공간의 가중 비율로 표현됩니다. |
이 예제에서는 일부 TextBlock 개체와 Rectangle 을 Grid 내부에 배치하는 방법을 보여줍니다.
XAML
<Grid >
<Grid.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="36"/>
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Margin="2" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
TextWrapping="Wrap">
This TextBlock is positioned in the first column and the
first row (column 0, row 0) and spans across all three columns (ColumnSpan 3).
</TextBlock>
<TextBlock Grid.Column="0" Grid.Row="1" Margin="5" FontWeight="Bold">Rectangle:</TextBlock>
<Rectangle Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" Fill="Red"
Width="200" Height="50"/>
<Button Grid.Column="0" Grid.Row="2" Content="Stretched Button" />
<Border Background="Blue" BorderThickness="5" Grid.Row="2" Grid.Column="1" Grid.RowSpan="2" >
<TextBlock TextWrapping="Wrap">
This TextBlock spans across two rows.
</TextBlock>
</Border>
<TextBlock Margin="5" Grid.Row="3" Grid.Column="0">1st Column, 4th Row</TextBlock>
<TextBlock Margin="5" Grid.Row="3" Grid.Column="2">3rd Column, 4th Row</TextBlock>
</Grid>
제품 | 버전 |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |