■ TextBlock 엘리먼트에서 기본 제공 타이포그래피를 사용하는 방법을 보여준다.
▶ MainPage.xaml
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
<?xml version="1.0" encoding="utf-8"?> <Page x:Class="TestProject.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" FontFamily="나눔고딕코딩" FontSize="16"> <Grid HorizontalAlignment="Center" VerticalAlignment="Center"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="10" /> <RowDefinition Height="Auto" /> <RowDefinition Height="10" /> <RowDefinition Height="Auto" /> <RowDefinition Height="10" /> <RowDefinition Height="Auto" /> <RowDefinition Height="10" /> <RowDefinition Height="Auto" /> <RowDefinition Height="10" /> <RowDefinition Height="Auto" /> <RowDefinition Height="10" /> <RowDefinition Height="Auto" /> <RowDefinition Height="10" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="20" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="20" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="20" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <TextBlock Grid.Row="0" Grid.Column="0" Text="Example" /> <TextBlock Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" Text="Variable Font" /> <TextBlock Grid.Row="0" Grid.Column="4" VerticalAlignment="Center" Text="Siz/Line height" /> <TextBlock Grid.Row="0" Grid.Column="6" VerticalAlignment="Center" Text="Style" /> <TextBlock Grid.Row="2" Grid.Column="0" Style="{StaticResource CaptionTextBlockStyle}" Text="Caption" /> <TextBlock Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Text="Small, Regular" /> <TextBlock Grid.Row="2" Grid.Column="4" VerticalAlignment="Center" Text="12/16 epx" /> <TextBlock Grid.Row="2" Grid.Column="6" VerticalAlignment="Center" Text="CaptionTextBlockStyle" /> <TextBlock Grid.Row="4" Grid.Column="0" Style="{StaticResource BodyTextBlockStyle}" Text="Body" /> <TextBlock Grid.Row="4" Grid.Column="2" VerticalAlignment="Center" Text="Text, Regular" /> <TextBlock Grid.Row="4" Grid.Column="4" VerticalAlignment="Center" Text="14/20 epx" /> <TextBlock Grid.Row="4" Grid.Column="6" VerticalAlignment="Center" Text="BodyTextBlockStyle" /> <TextBlock Grid.Row="6" Grid.Column="0" Style="{StaticResource BodyStrongTextBlockStyle}" Text="Body Strong" /> <TextBlock Grid.Row="6" Grid.Column="2" VerticalAlignment="Center" Text="Text, SemiBold" /> <TextBlock Grid.Row="6" Grid.Column="4" VerticalAlignment="Center" Text="14/20 epx" /> <TextBlock Grid.Row="6" Grid.Column="6" VerticalAlignment="Center" Text="BodyStrongTextBlockStyle" /> <TextBlock Grid.Row="8" Grid.Column="0" Style="{StaticResource SubtitleTextBlockStyle}" Text="Subtitle" /> <TextBlock Grid.Row="8" Grid.Column="2" VerticalAlignment="Center" Text="Display, SemiBold" /> <TextBlock Grid.Row="8" Grid.Column="4" VerticalAlignment="Center" Text="20/28 epx" /> <TextBlock Grid.Row="8" Grid.Column="6" VerticalAlignment="Center" Text="SubtitleTextBlockStyle" /> <TextBlock Grid.Row="10" Grid.Column="0" Style="{StaticResource TitleTextBlockStyle}" Text="Title" /> <TextBlock Grid.Row="10" Grid.Column="2" VerticalAlignment="Center" Text="Display, SemiBold" /> <TextBlock Grid.Row="10" Grid.Column="4" VerticalAlignment="Center" Text="28/36 epx" /> <TextBlock Grid.Row="10" Grid.Column="6" VerticalAlignment="Center" Text="TitleTextBlockStyle" /> <TextBlock Grid.Row="12" Grid.Column="0" Style="{StaticResource TitleLargeTextBlockStyle}" Text="Title Large" /> <TextBlock Grid.Row="12" Grid.Column="2" VerticalAlignment="Center" Text="Display, SemiBold" /> <TextBlock Grid.Row="12" Grid.Column="4" VerticalAlignment="Center" Text="40/52 epx" /> <TextBlock Grid.Row="12" Grid.Column="6" VerticalAlignment="Center" Text="TitleLargeTextBlockStyle" /> <TextBlock Grid.Row="14" Grid.Column="0" Style="{StaticResource DisplayTextBlockStyle}" Text="Display" /> <TextBlock Grid.Row="14" Grid.Column="2" VerticalAlignment="Center" Text="Display, SemiBold" /> <TextBlock Grid.Row="14" Grid.Column="4" VerticalAlignment="Center" Text="68/92 epx" /> <TextBlock Grid.Row="14" Grid.Column="6" VerticalAlignment="Center" Text="DisplayTextBlockStyle" /> </Grid> </Page> |