<Page
x:Class="Windows10.Controls.MediaControl.InkCanvasDemo4"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Windows10.Controls.MediaControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="Transparent">
<StackPanel Margin="10 0 10 10">
<Border Background="White" Width="480" Height="320" Margin="5" HorizontalAlignment="Left">
<!--
InkCanvas - 涂鸦板控件
-->
<InkCanvas Name="inkCanvas" />
</Border>
<Button Name="recognize" Content="手写识别" Margin="5" Click="recognize_Click" />
<TextBlock Name="lblMsg" Margin="5" />
</StackPanel>
</Grid>
</Page>
/*
* InkCanvas - 涂鸦板控件(继承自 FrameworkElement, 请参见 /Controls/BaseControl/FrameworkElementDemo/)
* InkPresenter - 获取 InkPresenter 对象
*
* InkRecognizerContainer - 用于管理手写识别
* GetRecognizers() - 获取 InkRecognizer 对象集合
* SetDefaultRecognizer(InkRecognizer recognizer) - 将指定的 InkRecognizer 设置为默认的手写识别器
* RecognizeAsync(InkStrokeContainer strokeCollection, InkRecognitionTarget recognitionTarget) - 识别,返回 InkRecognitionResult 对象集合
* InkStrokeContainer strokeCollection - 需要识别的 InkStrokeContainer 对象
* InkRecognitionTarget recognitionTarget - 需要识别的目标
* All - 识别全部涂鸦数据
* Selected - 识别被选中的涂鸦数据
* Recent - 识别 InkStroke 的 Recognized 为 false 的涂鸦数据
*
* InkRecognizer - 手写识别器
* Name - 手写识别器的名字(只读)
*
* InkRecognitionResult - 手写识别结果
* BoundingRect - 获取用于识别的涂鸦的 Rect 区域
* GetStrokes() - 获取用于识别的 InkStroke 对象集合
* GetTextCandidates() - 获取识别结果,这是一个候选结果列表
*
* InkPresenter - 涂鸦板
* StrokeContainer - 返回 InkStrokeContainer 类型的对象
*