-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
IncrementalHitTester.xml
313 lines (280 loc) · 19.4 KB
/
IncrementalHitTester.xml
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
<Type Name="IncrementalHitTester" FullName="System.Windows.Ink.IncrementalHitTester">
<TypeSignature Language="C#" Value="public abstract class IncrementalHitTester" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit IncrementalHitTester extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Windows.Ink.IncrementalHitTester" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class IncrementalHitTester" />
<TypeSignature Language="F#" Value="type IncrementalHitTester = class" />
<TypeSignature Language="C++ CLI" Value="public ref class IncrementalHitTester abstract" />
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Dynamically performs hit testing on a <see cref="T:System.Windows.Ink.Stroke" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Ink.IncrementalHitTester> dynamically determines whether the user "hits" a <xref:System.Windows.Ink.Stroke>. This class enables you to provide immediate feedback to the user in situations such as selecting and erasing ink.
There are two classes that inherit from <xref:System.Windows.Ink.IncrementalHitTester>:
- The <xref:System.Windows.Ink.IncrementalLassoHitTester> hit tests strokes by determining whether a lasso path surrounds it.
- The <xref:System.Windows.Ink.IncrementalStrokeHitTester> hit tests strokes by determining where an eraser path intersects it.
The following table lists where to learn how to manage digital ink on a custom control.
|To do this…|See this article|
|-----------------|----------------------|
|Create a control that collects digital ink|[Creating an Ink Input Control](/dotnet/framework/wpf/advanced/creating-an-ink-input-control)|
|Create a control that enables the user to select ink|[How to: Select Ink from a Custom Control](/dotnet/framework/wpf/advanced/how-to-select-ink-from-a-custom-control)|
|Create a control that enables the user to point-erase ink|[How to: Erase Ink on a Custom Control](/dotnet/framework/wpf/advanced/how-to-erase-ink-on-a-custom-control)|
<a name="xamlTextUsage_IncrementalHitTester"></a>
## XAML Text Usage
This class is not typically used in XAML.
## Examples
The following example demonstrates how to add points to the <xref:System.Windows.Ink.IncrementalHitTester> when the user inputs data with the stylus. The example includes a <xref:System.Windows.Ink.IncrementalStrokeHitTester.StrokeHit> event handler that erases the part of the <xref:System.Windows.Ink.Stroke> that the user intersects. To create a control that enables a user to erase ink, see [How to: Erase Ink on a Custom Control](/dotnet/framework/wpf/advanced/how-to-erase-ink-on-a-custom-control).
:::code language="csharp" source="~/snippets/csharp/System.Windows/StrokeCollectionConverter/Overview/InkEraser.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/InkEraser/VisualBasic/InkEraser.vb" id="Snippet6":::
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="AddPoint">
<MemberSignature Language="C#" Value="public void AddPoint (System.Windows.Point point);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddPoint(valuetype System.Windows.Point point) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Ink.IncrementalHitTester.AddPoint(System.Windows.Point)" />
<MemberSignature Language="VB.NET" Value="Public Sub AddPoint (point As Point)" />
<MemberSignature Language="F#" Value="member this.AddPoint : System.Windows.Point -> unit" Usage="incrementalHitTester.AddPoint point" />
<MemberSignature Language="C++ CLI" Value="public:
 void AddPoint(System::Windows::Point point);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="point" Type="System.Windows.Point" />
</Parameters>
<Docs>
<param name="point">The <see cref="T:System.Windows.Point" /> to add to the <see cref="T:System.Windows.Ink.IncrementalHitTester" />.</param>
<summary>Adds a <see cref="T:System.Windows.Point" /> to the <see cref="T:System.Windows.Ink.IncrementalHitTester" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example demonstrates how to add points to the <xref:System.Windows.Ink.IncrementalHitTester> when the user inputs data with the mouse. The example includes a <xref:System.Windows.Ink.IncrementalStrokeHitTester.StrokeHit> event handler that erases the part of the <xref:System.Windows.Ink.Stroke> that the user intersects. To create a control that enables a user to erase ink, see [How to: Erase Ink on a Custom Control](/dotnet/framework/wpf/advanced/how-to-erase-ink-on-a-custom-control).
:::code language="csharp" source="~/snippets/csharp/System.Windows/StrokeCollectionConverter/Overview/InkEraser.cs" id="Snippet11":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/InkEraser/VisualBasic/InkEraser.vb" id="Snippet11":::
:::code language="csharp" source="~/snippets/csharp/System.Windows/StrokeCollectionConverter/Overview/InkEraser.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/InkEraser/VisualBasic/InkEraser.vb" id="Snippet2":::
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="AddPoints">
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Adds points to the <see cref="T:System.Windows.Ink.IncrementalHitTester" />.</summary>
</Docs>
</MemberGroup>
<Member MemberName="AddPoints">
<MemberSignature Language="C#" Value="public void AddPoints (System.Collections.Generic.IEnumerable<System.Windows.Point> points);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddPoints(class System.Collections.Generic.IEnumerable`1<valuetype System.Windows.Point> points) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Ink.IncrementalHitTester.AddPoints(System.Collections.Generic.IEnumerable{System.Windows.Point})" />
<MemberSignature Language="VB.NET" Value="Public Sub AddPoints (points As IEnumerable(Of Point))" />
<MemberSignature Language="F#" Value="member this.AddPoints : seq<System.Windows.Point> -> unit" Usage="incrementalHitTester.AddPoints points" />
<MemberSignature Language="C++ CLI" Value="public:
 void AddPoints(System::Collections::Generic::IEnumerable<System::Windows::Point> ^ points);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="points" Type="System.Collections.Generic.IEnumerable<System.Windows.Point>" />
</Parameters>
<Docs>
<param name="points">An array of type <see cref="T:System.Windows.Point" /> to add to the <see cref="T:System.Windows.Ink.IncrementalHitTester" />.</param>
<summary>Adds points to the <see cref="T:System.Windows.Ink.IncrementalHitTester" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example demonstrates how to add points to the <xref:System.Windows.Ink.IncrementalHitTester> when the user inputs data with the stylus. The example includes a <xref:System.Windows.Ink.IncrementalStrokeHitTester.StrokeHit> event handler that erases the part of the <xref:System.Windows.Ink.Stroke> that the user intersects. To create a control that enables a user to erase ink, see [How to: Erase Ink on a Custom Control](/dotnet/framework/wpf/advanced/how-to-erase-ink-on-a-custom-control).
:::code language="csharp" source="~/snippets/csharp/System.Windows/StrokeCollectionConverter/Overview/InkEraser.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/InkEraser/VisualBasic/InkEraser.vb" id="Snippet6":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AddPoints">
<MemberSignature Language="C#" Value="public void AddPoints (System.Windows.Input.StylusPointCollection stylusPoints);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddPoints(class System.Windows.Input.StylusPointCollection stylusPoints) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Ink.IncrementalHitTester.AddPoints(System.Windows.Input.StylusPointCollection)" />
<MemberSignature Language="VB.NET" Value="Public Sub AddPoints (stylusPoints As StylusPointCollection)" />
<MemberSignature Language="F#" Value="member this.AddPoints : System.Windows.Input.StylusPointCollection -> unit" Usage="incrementalHitTester.AddPoints stylusPoints" />
<MemberSignature Language="C++ CLI" Value="public:
 void AddPoints(System::Windows::Input::StylusPointCollection ^ stylusPoints);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stylusPoints" Type="System.Windows.Input.StylusPointCollection" />
</Parameters>
<Docs>
<param name="stylusPoints">A collection of <see cref="T:System.Windows.Input.StylusPoint" /> objects to add to the <see cref="T:System.Windows.Ink.IncrementalHitTester" />.</param>
<summary>Adds the specified <see cref="T:System.Windows.Input.StylusPoint" /> objects to the <see cref="T:System.Windows.Ink.IncrementalHitTester" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example demonstrates how to add points to the <xref:System.Windows.Ink.IncrementalStrokeHitTester> when the user inputs data with the stylus. The example includes a <xref:System.Windows.Ink.IncrementalStrokeHitTester.StrokeHit> event handler that erases the part of the <xref:System.Windows.Ink.Stroke> that the user intersects. To create a control that enables a user to erase ink, see [How to: Erase Ink on a Custom Control](/dotnet/framework/wpf/advanced/how-to-erase-ink-on-a-custom-control).
:::code language="csharp" source="~/snippets/csharp/System.Windows/StrokeCollectionConverter/Overview/InkEraser.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/InkEraser/VisualBasic/InkEraser.vb" id="Snippet6":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AddPointsCore">
<MemberSignature Language="C#" Value="protected abstract void AddPointsCore (System.Collections.Generic.IEnumerable<System.Windows.Point> points);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void AddPointsCore(class System.Collections.Generic.IEnumerable`1<valuetype System.Windows.Point> points) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Ink.IncrementalHitTester.AddPointsCore(System.Collections.Generic.IEnumerable{System.Windows.Point})" />
<MemberSignature Language="VB.NET" Value="Protected MustOverride Sub AddPointsCore (points As IEnumerable(Of Point))" />
<MemberSignature Language="F#" Value="abstract member AddPointsCore : seq<System.Windows.Point> -> unit" Usage="incrementalHitTester.AddPointsCore points" />
<MemberSignature Language="C++ CLI" Value="protected:
 abstract void AddPointsCore(System::Collections::Generic::IEnumerable<System::Windows::Point> ^ points);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="points" Type="System.Collections.Generic.IEnumerable<System.Windows.Point>" />
</Parameters>
<Docs>
<param name="points">The points to add.</param>
<summary>Adds points to the <see cref="T:System.Windows.Ink.IncrementalHitTester" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="EndHitTesting">
<MemberSignature Language="C#" Value="public void EndHitTesting ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void EndHitTesting() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Ink.IncrementalHitTester.EndHitTesting" />
<MemberSignature Language="VB.NET" Value="Public Sub EndHitTesting ()" />
<MemberSignature Language="F#" Value="member this.EndHitTesting : unit -> unit" Usage="incrementalHitTester.EndHitTesting " />
<MemberSignature Language="C++ CLI" Value="public:
 void EndHitTesting();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Releases resources used by the <see cref="T:System.Windows.Ink.IncrementalHitTester" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Call the <xref:System.Windows.Ink.IncrementalHitTester.EndHitTesting%2A> method when the <xref:System.Windows.Ink.IncrementalHitTester> finishes hit testing.
## Examples
The following example demonstrates how to call <xref:System.Windows.Ink.IncrementalHitTester.EndHitTesting%2A> after using an <xref:System.Windows.Ink.IncrementalHitTester>. This example assumes that there is an <xref:System.Windows.Ink.IncrementalHitTester> called `eraseTester`.
:::code language="csharp" source="~/snippets/csharp/System.Windows/StrokeCollectionConverter/Overview/InkEraser.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/InkEraser/VisualBasic/InkEraser.vb" id="Snippet10":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsValid">
<MemberSignature Language="C#" Value="public bool IsValid { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsValid" />
<MemberSignature Language="DocId" Value="P:System.Windows.Ink.IncrementalHitTester.IsValid" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsValid As Boolean" />
<MemberSignature Language="F#" Value="member this.IsValid : bool" Usage="System.Windows.Ink.IncrementalHitTester.IsValid" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool IsValid { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets whether the <see cref="T:System.Windows.Ink.IncrementalHitTester" /> is hit testing.</summary>
<value>
<see langword="true" /> if the <see cref="T:System.Windows.Ink.IncrementalHitTester" /> is hit testing; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Ink.IncrementalHitTester.IsValid%2A> returns `true` until <xref:System.Windows.Ink.IncrementalHitTester.EndHitTesting%2A> is called. Then it returns `false`.
## Examples
The following example demonstrates how to check whether the <xref:System.Windows.Ink.IncrementalHitTester> is valid before adding points to it. This example assumes that there is an <xref:System.Windows.Ink.IncrementalHitTester> called `eraseTester`.
:::code language="csharp" source="~/snippets/csharp/System.Windows/StrokeCollectionConverter/Overview/InkEraser.cs" id="Snippet9":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/InkEraser/VisualBasic/InkEraser.vb" id="Snippet9":::
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>