-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
68 lines (61 loc) · 3.56 KB
/
MainWindow.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
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="WinUI3_SwapChainPanel_DWriteCore.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinUI3_SwapChainPanel_DWriteCore"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button x:Name="myButton" Click="myButton_Click">Click Me</Button>
</StackPanel>-->
<Grid x:Name="mainGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top">
<!--<Button x:Name="myButton" Click="myButton_Click" Margin="10, 10, 0, 0" VerticalAlignment="Center" >Set font for text with shadow</Button>-->
<TextBlock Margin="10, 10, 0, 0" VerticalAlignment="Center" >Font for shadowed text :</TextBlock>
<TextBlock Margin="10, 10, 0, 0" VerticalAlignment="Center" >Custom fonts :</TextBlock>
<ComboBox x:Name="FontListCustom" Width="300" Margin="10, 10, 0, 0" VerticalAlignment="Center"
SelectionChanged="FontListCustom_SelectionChanged"
ItemsSource="{x:Bind CustomFonts}">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="local:Font">
<TextBlock FontFamily="{x:Bind FontFamilyPath}" FontSize="24" Text="{x:Bind Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Margin="10, 10, 0, 0" VerticalAlignment="Center" >System fonts :</TextBlock>
<ComboBox x:Name="FontListSystem" Width="500" Margin="10, 10, 0, 0" VerticalAlignment="Center"
SelectionChanged="FontListSystem_SelectionChanged"
ItemsSource="{x:Bind SystemFonts}">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="local:Font">
<TextBlock FontFamily="{x:Bind FontFamilyPath}" FontWeight="{x:Bind FontWeight}" FontStyle="{x:Bind Style}"
FontStretch="{x:Bind Stretch}" FontSize="24" Text="{x:Bind Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</StackPanel>
<SwapChainPanel x:Name="scp1" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Margin="10, 10, 10, 10"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
RenderTransformOrigin="0.5 0.5" >
<!--Width ="800" Height="400"-->
<!--HorizontalAlignment="Center" VerticalAlignment="Center"-->
<!--<SwapChainPanel.RenderTransform>
<ScaleTransform ScaleY="1" ScaleX="1" />
-->
<!--<ScaleTransform ScaleY="1.25" ScaleX="1.25" />-->
<!--
</SwapChainPanel.RenderTransform>-->
</SwapChainPanel>
</Grid>
</Window>