StrokeCollection.InkSerializedFormat 字段

定义

表示墨迹数据的本机持久性格式。

public: static initonly System::String ^ InkSerializedFormat;
public static readonly string InkSerializedFormat;
 staticval mutable InkSerializedFormat : string
Public Shared ReadOnly InkSerializedFormat As String 

字段值

示例

以下示例演示如何将 复制到 StrokeCollection 剪贴板。 该示例指定 StrokeCollection 为墨迹序列化格式 (ISF) ,以便其他程序(如 Microsoft Office Word)可以接受复制的数据。

public void CopyStrokeCollection(StrokeCollection strokes)
{
    MemoryStream strokesInMemory = new MemoryStream();
    strokes.Save(strokesInMemory);
    
    DataObject dataobj = new DataObject(StrokeCollection.InkSerializedFormat,
        strokesInMemory);

    Clipboard.SetDataObject(dataobj, true);
}
Public Sub CopyStrokeCollection(ByVal strokes As StrokeCollection)

    Dim strokesInMemory As New MemoryStream()
    strokes.Save(strokesInMemory)
    Dim dataObj As New DataObject(StrokeCollection.InkSerializedFormat, _
                strokesInMemory)

    Clipboard.SetDataObject(dataObj, True)

End Sub

注解

InkSerializedFormat传输数据时(例如,将 复制到StrokeCollection剪贴板时),使用 字段指定 的格式StrokeCollection

适用于