共用方式為


InkCollector.Ink 屬性

取得或設定與 InkCollector 物件關聯的 Ink 物件。

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

語法

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

value = instance.Ink

instance.Ink = value
public Ink Ink { get; set; }
public:
property Ink^ Ink {
    Ink^ get ();
    void set (Ink^ value);
}
/** @property */
public Ink get_Ink()
/** @property */
public  void set_Ink(Ink value)
public function get Ink () : Ink
public function set Ink (value : Ink)

屬性值

型別:Microsoft.Ink.Ink
InkCollector 物件關聯的 Ink 物件。

備註

ms571716.alert_note(zh-tw,VS.90).gif注意事項:

必須停用 InkCollector 物件,才能設定這個屬性。若要停用 InkCollector 物件,請將 Enabled 屬性設為 false。然後,您就可以設定 Ink 屬性,並透過將 Enabled 屬性設定為 true 來重新啟用 InkCollector 物件。

InkCollector 物件預設會建立 Ink 物件。如果已知的應用程式視窗有兩個以上的 Ink 物件,可將它們關閉以收集任何一個物件 (例如在還原序列化其中一個 Ink 物件之後)。

範例

在這個範例中,InkCollector 物件透過維護多個 Ink 物件,處理多個虛擬頁面。

先初始化 Ink 物件的陣列,才能切換頁面。

mInkArrayCollector = New Ink(MAX_PAGE - 1) {}
For k As Integer = 0 To MAX_PAGE - 1
    mInkArrayCollector(k) = New Ink()
Next
mInkArrayCollector = new Ink[MAX_PAGE];
for (int k = 0; k < MAX_PAGE; k++)
{
    mInkArrayCollector[k] = new Ink();
}

然後,為回應使用者動作 (例如從功能表或清單中選取),會重新指派 InkCollector 物件的 Ink 物件,並重新繪製附加 InkCollector 物件的控制項。

Private Sub ChangeInkCollectorPage(ByVal PageNum As Integer)
    mInkCollector.Enabled = False
    mInkCollector.Ink = mInkArrayCollector(PageNum)
    mInkCollector.Enabled = True
    ' Note: mInkCollector was instantiated via: new InkCollector(control)
    ' not via: new InkCollector(control.Handle) - this .ctor does not set AttachedControl
    mInkCollector.AttachedControl.Invalidate()
End Sub
private void ChangeInkCollectorPage(int PageNum)
{
    mInkCollector.Enabled = false;
    mInkCollector.Ink = mInkArrayCollector[PageNum];
    mInkCollector.Enabled = true;
    // Note: mInkCollector was instantiated via: new InkCollector(control)
    // not via: new InkCollector(control.Handle) - this .ctor does not set AttachedControl
    mInkCollector.AttachedControl.Invalidate();
}

平台

Windows Vista

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

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

InkCollector 類別

InkCollector 成員

Microsoft.Ink 命名空間

InkCollector.Enabled

Ink