-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainWindow.xaml
146 lines (141 loc) · 6.78 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
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
136
137
138
139
140
141
142
143
144
145
146
<Window x:Class="TextOnPathTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:textonpath="clr-namespace:Control.TextOnPath"
Title="TextOnPath"
Width="695.407"
Height="360.323"
mc:Ignorable="d">
<Grid>
<Grid.Resources>
<PathGeometry x:Key="path1"
Figures="M 50,50 C 100,0 200,100 250,50" />
<Geometry x:Key="path2">M 50,50 C 100,0 200,100 250,50</Geometry>
<LineGeometry x:Key="path3"
StartPoint="100,100"
EndPoint="400,200" />
<RectangleGeometry x:Key="path4"
Rect="100,100,130,130" />
<EllipseGeometry x:Key="path5"
Center="120,130"
RadiusX="100"
RadiusY="30" />
<PathFigure x:Key="path6"
IsClosed="False"
StartPoint="100,100">
<BezierSegment Point1="200,150"
Point2="350,0"
Point3="400,150" />
</PathFigure>
<PathGeometry x:Key="path7"
Figures="M10,90 Q90,90 90,45 Q90,10 50,10 Q10,10 10,40 Q10,70 45,70 Q70,70 75,50">
<Geometry.Transform>
<ScaleTransform ScaleX="3" ScaleY="3" />
</Geometry.Transform>
</PathGeometry>
</Grid.Resources>
<textonpath:TextOnPath Margin="371,146,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Path="{StaticResource path2}"
Text="Hello Path"
Warp="False">
<textonpath:TextOnPath.Fill>
<LinearGradientBrush StartPoint="1,0.5" EndPoint="0,0.5">
<GradientStop Offset="0" Color="#FF02B9A0" />
<GradientStop Offset="1" Color="#FFD4C100" />
</LinearGradientBrush>
</textonpath:TextOnPath.Fill>
</textonpath:TextOnPath>
<textonpath:TextOnPath Margin="305,29,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
FontWeight="ExtraBlack"
Path="{StaticResource path6}"
Stroke="#FF830483"
StrokeThickness="3"
Text="Hello Path"
Warp="True">
<textonpath:TextOnPath.Fill>
<LinearGradientBrush StartPoint="1,0.5" EndPoint="0,0.5">
<GradientStop Offset="0" Color="#FF003AFF" />
<GradientStop Offset="1" Color="Red" />
</LinearGradientBrush>
</textonpath:TextOnPath.Fill>
</textonpath:TextOnPath>
<textonpath:TextOnPath Margin="263,222,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
FontSize="40"
FontWeight="Black"
Stretch="True"
Stroke="#FF830483"
StrokeThickness="2"
Text="Hello"
Warp="True">
<textonpath:TextOnPath.Path>
<PathFigure IsClosed="False"
StartPoint="00,40">
<BezierSegment Point1="30,0"
Point2="70,0"
Point3="100,40" />
</PathFigure>
</textonpath:TextOnPath.Path>
<textonpath:TextOnPath.Fill>
<LinearGradientBrush StartPoint="1,0.5" EndPoint="0,0.5">
<GradientStop Offset="0" Color="#FF7D9BFF" />
<GradientStop Offset="1" Color="#FFF17D7D" />
</LinearGradientBrush>
</textonpath:TextOnPath.Fill>
</textonpath:TextOnPath>
<textonpath:TextOnPath Margin="22,29,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
FontSize="20"
FontWeight="Black"
Path="{StaticResource path7}"
Stretch="True"
StrokeThickness="3"
Text="Quick brown fox jumps over the lazy dog."
Warp="True">
<textonpath:TextOnPath.Stroke>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Offset="0.085" Color="#FF02B9A0" />
<GradientStop Offset="0.892" Color="#FFD4C100" />
<GradientStop Offset="0.499" Color="#FFB65959" />
</LinearGradientBrush>
</textonpath:TextOnPath.Stroke>
</textonpath:TextOnPath>
<textonpath:TextOnPath Margin="445,250,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
FontSize="40"
FontWeight="Bold"
Stretch="True"
Stroke="#FF830483"
StrokeThickness="0"
Text="Hello colorful path"
Warp="True">
<textonpath:TextOnPath.Path>
<PathFigure IsClosed="False"
StartPoint="0,0">
<BezierSegment Point1="20,30"
Point2="70,30"
Point3="100,30" />
<BezierSegment Point1="120,30"
Point2="190,30"
Point3="200,0" />
</PathFigure>
</textonpath:TextOnPath.Path>
<textonpath:TextOnPath.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Offset="1" Color="#FF7D9BFF" />
<GradientStop Offset="0" Color="#FFF17D7D" />
<GradientStop Offset="0.519" Color="#FFBEC08C" />
</LinearGradientBrush>
</textonpath:TextOnPath.Fill>
</textonpath:TextOnPath>
</Grid>
</Window>