共用方式為


Ink.CustomStrokes 屬性

取得要以筆墨保存的 CustomStrokes 集合。

命名空間:  Microsoft.Ink
組件:  Microsoft.Ink (在 Microsoft.Ink.dll 中)

語法

'宣告
Public ReadOnly Property CustomStrokes As CustomStrokes
'用途
Dim instance As Ink
Dim value As CustomStrokes

value = instance.CustomStrokes
public CustomStrokes CustomStrokes { get; }
public:
property CustomStrokes^ CustomStrokes {
    CustomStrokes^ get ();
}
/** @property */
public CustomStrokes get_CustomStrokes()
public function get CustomStrokes () : CustomStrokes

屬性值

型別:Microsoft.Ink.CustomStrokes
要以筆墨保存的 CustomStrokes 集合。

範例

在這個範例中,會使用指定的名稱在傳遞的 Ink 物件之 Strokes 集合內加入同一個傳遞的 Ink 物件之 CustomStrokes 集合。如果 CustomStrokes 具名集合已存在,則會引發例外狀況。

Private Sub AddCustomStrokes(ByVal mName As String, ByVal mInk As Ink)
    Try
        ' if the name already exists, an exception will be raised
        mInk.CustomStrokes.Add(mName, mInk.Strokes)
    Catch E As ArgumentException
        ' this exception is raised when the named collection already exists
    End Try
End Sub
private void AddCustomStrokes(string mName, Ink mInk)
{
    try
    {
        // if the name already exists, an exception will be raised
        mInk.CustomStrokes.Add(mName, mInk.Strokes);
    }
    catch (ArgumentException)
    {
        // this exception is raised when the named collection already exists
    }
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

Ink 類別

Ink 成員

Microsoft.Ink 命名空間

CustomStrokes

Strokes