1 <Canvas xmlns="http://schemas.microsoft.com/client/2007"
2 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Loaded="OnLoaded"
3 Width="800" Height="800" Background="yellow">
4 <!-- InkPresenter draws like a canvas (and more) -->
5 <InkPresenter x:Name="inky" Width="20" Height="20" Background="White">
6 <InkPresenter.RenderTransform>
8 <TransformGroup.Children>
10 <ScaleTransform x:Name="strans" ScaleX=".2" ScaleY=".2" />
11 <TranslateTransform X="50" />
12 </TransformCollection>
13 </TransformGroup.Children>
15 </InkPresenter.RenderTransform>
16 <InkPresenter.Strokes>
18 <!-- a single red point, no pressure factor (default) -->
20 <Stroke.DrawingAttributes>
21 <DrawingAttributes Color="#FFFF0000" Height="10" Width="10"/>
22 </Stroke.DrawingAttributes>
24 <StylusPointCollection>
25 <StylusPoint X="20" Y="20" />
26 </StylusPointCollection>
27 </Stroke.StylusPoints>
30 <!-- a single red point with a black outline, no pressure factor (default) -->
32 <Stroke.DrawingAttributes>
33 <DrawingAttributes Color="#FFFF0000" OutlineColor="#FF000000" Height="10" Width="10"/>
34 </Stroke.DrawingAttributes>
36 <StylusPointCollection>
37 <StylusPoint X="40" Y="20" />
38 </StylusPointCollection>
39 </Stroke.StylusPoints>
42 <!-- a single green point with a black outline, 0 pressure factor -->
44 <Stroke.DrawingAttributes>
45 <DrawingAttributes Color="#FF00FF00" OutlineColor="#FF000000" Height="10" Width="10"/>
46 </Stroke.DrawingAttributes>
48 <StylusPointCollection>
49 <StylusPoint X="60" Y="20" PressureFactor="0" />
50 </StylusPointCollection>
51 </Stroke.StylusPoints>
54 <!-- a single blue point with a black outline, 0.5 pressure factor -->
56 <Stroke.DrawingAttributes>
57 <DrawingAttributes Color="#FF0000FF" OutlineColor="#FF000000" Height="10" Width="10"/>
58 </Stroke.DrawingAttributes>
60 <StylusPointCollection>
61 <StylusPoint X="80" Y="20" PressureFactor="0.5" />
62 </StylusPointCollection>
63 </Stroke.StylusPoints>
66 <!-- a single white point with a black outline, 0.5 pressure factor -->
68 <Stroke.DrawingAttributes>
69 <DrawingAttributes Color="#FFFFFFFF" OutlineColor="#FF000000" Height="10" Width="10"/>
70 </Stroke.DrawingAttributes>
72 <StylusPointCollection>
73 <StylusPoint X="100" Y="20" PressureFactor="1.0" />
74 </StylusPointCollection>
75 </Stroke.StylusPoints>
79 <!-- two red points, no pressure factor (default) -->
81 <Stroke.DrawingAttributes>
82 <DrawingAttributes Color="#FFFF0000" Height="10" Width="10"/>
83 </Stroke.DrawingAttributes>
85 <StylusPointCollection>
86 <StylusPoint X="20" Y="40" />
87 <StylusPoint X="20" Y="60" />
88 </StylusPointCollection>
89 </Stroke.StylusPoints>
92 <!-- two red points with a black outline, no pressure factor (default) -->
94 <Stroke.DrawingAttributes>
95 <DrawingAttributes Color="#FFFF0000" OutlineColor="#FF000000" Height="10" Width="10"/>
96 </Stroke.DrawingAttributes>
98 <StylusPointCollection>
99 <StylusPoint X="40" Y="40" />
100 <StylusPoint X="40" Y="60" />
101 </StylusPointCollection>
102 </Stroke.StylusPoints>
105 <!-- two green points with a black outline, 0 pressure factor -->
107 <Stroke.DrawingAttributes>
108 <DrawingAttributes Color="#FF00FF00" OutlineColor="#FF000000" Height="10" Width="10"/>
109 </Stroke.DrawingAttributes>
110 <Stroke.StylusPoints>
111 <StylusPointCollection>
112 <StylusPoint X="60" Y="40" PressureFactor="0" />
113 <StylusPoint X="60" Y="60" PressureFactor="0" />
114 </StylusPointCollection>
115 </Stroke.StylusPoints>
118 <!-- two blue points with a black outline, 0.5 pressure factor -->
120 <Stroke.DrawingAttributes>
121 <DrawingAttributes Color="#FF0000FF" OutlineColor="#FF000000" Height="10" Width="10"/>
122 </Stroke.DrawingAttributes>
123 <Stroke.StylusPoints>
124 <StylusPointCollection>
125 <StylusPoint X="80" Y="40" PressureFactor="0.5" />
126 <StylusPoint X="80" Y="60" PressureFactor="0.5" />
127 </StylusPointCollection>
128 </Stroke.StylusPoints>
131 <!-- two white points with a black outline, 0.5 pressure factor -->
133 <Stroke.DrawingAttributes>
134 <DrawingAttributes Color="#FFFFFFFF" OutlineColor="#FF000000" Height="10" Width="10"/>
135 </Stroke.DrawingAttributes>
136 <Stroke.StylusPoints>
137 <StylusPointCollection>
138 <StylusPoint X="100" Y="40" PressureFactor="1.0" />
139 <StylusPoint X="100" Y="60" PressureFactor="1.0" />
140 </StylusPointCollection>
141 </Stroke.StylusPoints>
145 <!-- three red points, no pressure factor (default) -->
147 <Stroke.DrawingAttributes>
148 <DrawingAttributes Color="#FFFF0000" Height="10" Width="5"/>
149 </Stroke.DrawingAttributes>
150 <Stroke.StylusPoints>
151 <StylusPointCollection>
152 <StylusPoint X="20" Y="80" />
153 <StylusPoint X="40" Y="100" />
154 <StylusPoint X="20" Y="120" />
155 </StylusPointCollection>
156 </Stroke.StylusPoints>
159 <!-- three red points with a black outline, no pressure factor (default) -->
161 <Stroke.DrawingAttributes>
162 <DrawingAttributes Color="#FFFF0000" OutlineColor="#FF000000" Height="10" Width="5"/>
163 </Stroke.DrawingAttributes>
164 <Stroke.StylusPoints>
165 <StylusPointCollection>
166 <StylusPoint X="40" Y="80" />
167 <StylusPoint X="60" Y="100" />
168 <StylusPoint X="40" Y="120" />
169 </StylusPointCollection>
170 </Stroke.StylusPoints>
173 <!-- three green points with a black outline, 0 pressure factor -->
175 <Stroke.DrawingAttributes>
176 <DrawingAttributes Color="#FF00FF00" OutlineColor="#FF000000" Height="10" Width="5"/>
177 </Stroke.DrawingAttributes>
178 <Stroke.StylusPoints>
179 <StylusPointCollection>
180 <StylusPoint X="60" Y="80" PressureFactor="0" />
181 <StylusPoint X="80" Y="100" PressureFactor="0" />
182 <StylusPoint X="60" Y="120" PressureFactor="0" />
183 </StylusPointCollection>
184 </Stroke.StylusPoints>
187 <!-- three blue points with a black outline, 0.5 pressure factor -->
189 <Stroke.DrawingAttributes>
190 <DrawingAttributes Color="#FF0000FF" OutlineColor="#FF000000" Height="10" Width="5"/>
191 </Stroke.DrawingAttributes>
192 <Stroke.StylusPoints>
193 <StylusPointCollection>
194 <StylusPoint X="80" Y="80" PressureFactor="0.5" />
195 <StylusPoint X="100" Y="100" PressureFactor="0.5" />
196 <StylusPoint X="80" Y="120" PressureFactor="0.5" />
197 </StylusPointCollection>
198 </Stroke.StylusPoints>
201 <!-- three white points with a black outline, 0.5 pressure factor -->
203 <Stroke.DrawingAttributes>
204 <DrawingAttributes Color="#FFFFFFFF" OutlineColor="#FF000000" Height="10" Width="5"/>
205 </Stroke.DrawingAttributes>
206 <Stroke.StylusPoints>
207 <StylusPointCollection>
208 <StylusPoint X="100" Y="80" PressureFactor="1.0" />
209 <StylusPoint X="120" Y="100" PressureFactor="1.0" />
210 <StylusPoint X="100" Y="120" PressureFactor="1.0" />
211 </StylusPointCollection>
212 </Stroke.StylusPoints>
215 </InkPresenter.Strokes>