InkAnalyzer.Search Method (String, Int32)
Provides a fuzzy, case-insensitive phrase based search for analyzed writing strokes and analyzed drawing strokes that have recognized types.
Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)
Syntax
'Declaration
Public Function Search ( _
phraseToSearch As String, _
languageId As Integer _
) As StrokeCollection()
'Usage
Dim instance As InkAnalyzer
Dim phraseToSearch As String
Dim languageId As Integer
Dim returnValue As StrokeCollection()
returnValue = instance.Search(phraseToSearch, languageId)
public StrokeCollection[] Search (
string phraseToSearch,
int languageId
)
public:
array<StrokeCollection^>^ Search (
String^ phraseToSearch,
int languageId
)
public StrokeCollection[] Search (
String phraseToSearch,
int languageId
)
public function Search (
phraseToSearch : String,
languageId : int
) : StrokeCollection[]
Not applicable.
Parameters
- phraseToSearch
The phrase that may be found in the alternates for the currently analyzed strokes.
- languageId
The locale identifier to use when doing the search.
Return Value
An array of type StrokeCollection that contains the sets of strokes that represent the found phrase. No two StrokeCollection objects may have exactly the same strokes in them, but strokes can appear in more than one set due to alternate segmentations or multiple matches.
Remarks
This search finds multi-word and single-word substrings. Both alternate recognition results and alternate segmentations are searched.
All incoming strings convert to a single casing for comparison utilizing the Locale ID, LCID, of the current thread for the conversion while applying cultural case conventions.
The string passed is treated as a phrase. Words and characters must appear in the alternates for the strokes in the order specified. The first and last words of the phrase may be matched as substrings. When this happens, the first word appears at the end of an alternate and the last word appears at the beginning. Other words, located inside of the phrase, must appear as whole words.
If the string passed in has no white space in between characters, the substring may be found anywhere inside of a single word in an alternate.
Only the presence or absence of white space between characters changes the results of search. White space that is not surrounded by characters is ignored. The type of the white space is ignored (a tab or a space between characters will give the same result). The amount of white space does not matter - one space or two spaces in between characters will give the same result.
Search does not generate PopulateContextNode events. Only the strokes that have already been populated will be searched.
Platforms
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
InkAnalyzer Class
InkAnalyzer Members
System.Windows.Ink Namespace