-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathTextOutlines.xaml
More file actions
62 lines (58 loc) · 3.41 KB
/
Copy pathTextOutlines.xaml
File metadata and controls
62 lines (58 loc) · 3.41 KB
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
<?xml version="1.0"?>
<!--
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See LICENSE.txt in the project root for license information.
-->
<UserControl
x:Class="ExampleGallery.TextOutlines"
x:Name="control"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ExampleGallery"
xmlns:canvas="using:Microsoft.Graphics.Canvas.UI.Xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400"
Unloaded="control_Unloaded">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ScrollViewer Grid.Column="0" VerticalScrollMode="Auto" HorizontalScrollMode="Disabled" VerticalScrollBarVisibility="Hidden">
<StackPanel Orientation="Vertical" MinWidth="100" Margin="5">
<TextBlock>Text length:</TextBlock>
<ComboBox ItemsSource="{Binding ElementName=control, Path=TextLengthOptions}"
SelectedItem="{Binding CurrentTextLengthOption, ElementName=control, Mode=TwoWay}"
SelectionChanged="InvalidateCanvas"
HorizontalAlignment="Stretch"/>
<TextBlock>Text direction:</TextBlock>
<ComboBox ItemsSource="{Binding ElementName=control, Path=TextDirectionOptions}"
SelectedItem="{Binding CurrentTextDirection, ElementName=control, Mode=TwoWay}"
SelectionChanged="InvalidateCanvas"
HorizontalAlignment="Stretch"/>
<TextBlock>Text effects:</TextBlock>
<ComboBox ItemsSource="{Binding ElementName=control, Path=TextEffectOptions}"
SelectedItem="{Binding CurrentTextEffectOption, ElementName=control, Mode=TwoWay}"
SelectionChanged="InvalidateCanvas"/>
<TextBlock>Vertical glyph orientation:</TextBlock>
<ComboBox ItemsSource="{Binding ElementName=control, Path=VerticalGlyphOrientationOptions}"
SelectedItem="{Binding CurrentVerticalGlyphOrientation, ElementName=control, Mode=TwoWay}"
SelectionChanged="InvalidateCanvas"
HorizontalAlignment="Stretch"/>
<TextBlock>Outline granularity:</TextBlock>
<ComboBox ItemsSource="{Binding ElementName=control, Path=TextOutlineGranularityOptions}"
SelectedItem="{Binding CurrentTextOutlineGranularityOption, ElementName=control, Mode=TwoWay}"
SelectionChanged="InvalidateCanvas"
HorizontalAlignment="Stretch"/>
<ToggleButton Content="Show non-outline text" IsChecked="{Binding ElementName=control, Path=ShowNonOutlineText, Mode=TwoWay}" Click="InvalidateCanvas" HorizontalAlignment="Stretch"/>
</StackPanel>
</ScrollViewer>
<canvas:CanvasControl x:Name="canvas" Grid.Column="1" Margin="5"
Draw="Canvas_Draw"
CreateResources="Canvas_CreateResources"
SizeChanged="Canvas_SizeChanged"/>
</Grid>
</UserControl>