Share via


InkStrokeContainer 类

定义

提供用于存储和管理 InkPresenter 呈现的 InkStroke 对象的集合的属性和方法。

对笔划容器中任何墨迹笔划所做的修改将立即呈现到与 InkPresenter 关联的绘图图面。

public ref class InkStrokeContainer sealed : IInkStrokeContainer
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.None)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class InkStrokeContainer final : IInkStrokeContainer
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.None)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class InkStrokeContainer final : IInkStrokeContainer
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.None)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class InkStrokeContainer : IInkStrokeContainer
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.None)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class InkStrokeContainer : IInkStrokeContainer
function InkStrokeContainer()
Public NotInheritable Class InkStrokeContainer
Implements IInkStrokeContainer
继承
Object Platform::Object IInspectable InkStrokeContainer
属性
实现

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

对于墨迹识别,请使用 InkRecognizerContainer 对象。

在 UI 线程上将墨迹笔划处理 (“湿”到“干”) 时,将触发 StrokesCollected 事件。

注意

此类不敏捷,这意味着需要考虑其线程模型和封送处理行为。 有关详细信息,请参阅线程和封送处理 (C++/CX) 和使用多线程环境中的Windows 运行时对象 (.NET)

版本历史记录

Windows 版本 SDK 版本 已添加值
1703 15063 GetStrokeById
1703 15063 SaveAsync (IOutputStream,InkPersistenceFormat)

构造函数

InkStrokeContainer()

初始化用于管理 InkStroke 对象 的新 InkStrokeContainer 对象。

属性

BoundingRect

获取由 InkStrokeContainer 管理的 InkStroke 集合的边框。

方法

AddStroke(InkStroke)

InkStroke 对象添加到由 InkStrokeContainer 管理的集合。

InkStroke 不能存在于多个 InkStrokeContainer 中。 调用 Clone 方法以复制另一个容器中的笔划。

AddStrokes(IIterable<InkStroke>)

将一个或多个墨迹笔划添加到由 InkStrokeContainer 管理的集合中。

InkStroke 不能存在于多个 InkStrokeContainer 中。 调用 Clone 方法以复制另一个容器中的笔划。

CanPasteFromClipboard()

标识剪贴板上的内容是否可以添加到 由 InkStrokeContainer 管理的 InkStroke 集合。

注意

剪贴板内容必须采用墨迹序列化格式 (ISF) 。

Clear()

InkStrokeContainer 管理的集合中删除所有 InkStroke 对象。

CopySelectedToClipboard()

将所选 InkStroke 对象 (从 InkStrokeContainer) 管理的 InkStroke 集合复制到 Ink 序列化格式 (ISF) 格式的剪贴板。

DeleteSelected()

InkStrokeContainer 管理的 InkStroke 集合中删除选定的 InkStroke 对象。

GetRecognitionResults()

获取先前由 InkRecognizer 处理并存储在 InkRecognizerContainer 中的识别匹配项的集合。

InkStrokeContainer 不支持识别,必须使用 InkRecognizerContainer 对象。

GetStrokeById(UInt32)

检索具有指定 ID 的单个 InkStroke。

GetStrokes()

检索由 InkStrokeContainer 管理的集合中的所有墨迹笔划。

LoadAsync(IInputStream)

将指定流中的所有 InkStroke 对象异步加载到 InkStrokeContainer 管理的 InkStroke 集合。

在加载新笔划之前, InkStrokeContainer 中的所有现有笔划都会被清除。

MoveSelected(Point)

移动所选笔划。 所有受影响的笔划都会重新呈现。

PasteFromClipboard(Point)

剪贴板中的 InkStroke 内容添加到 InkStrokeContainer 管理的 InkStroke 集合,并呈现新笔划。

SaveAsync(IOutputStream)

以异步方式将 InkStrokeContainer 管理的 InkStroke 集合中的所有 InkStroke 对象保存到指定的流。

SaveAsync(IOutputStream, InkPersistenceFormat)

以指定的格式异步将 InkStroke 集合中InkStrokeContainer 管理的所有 InkStroke 对象保存到指定的流中。

SelectWithLine(Point, Point)

选择与新笔划相交的所有笔划。

注意

为集合中所有其他笔划重置 Selected 标志。

SelectWithPolyLine(IIterable<Point>)

选择完全包含在折线中的所有笔划。

注意

为集合中所有其他笔划重置 Selected 标志。

.

UpdateRecognitionResults(IVectorView<InkRecognitionResult>)

汇报先前由 InkRecognizer 处理并存储在 InkRecognizerContainer 中的识别匹配项集合。

InkStrokeContainer 不支持识别,必须使用 InkRecognizerContainer 对象。

适用于

另请参阅