Поделиться через


InkOverlay.Ink - свойство

Обновлен: Ноябрь 2007

Gets or sets the Ink object that is associated with the InkOverlay object.

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
<BrowsableAttribute(False)> _
Public Property Ink As Ink
'Применение
Dim instance As InkOverlay
Dim value As Ink

value = instance.Ink

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

Значение свойства

Тип: Microsoft.Ink.Ink
The Ink object that is associated with the InkOverlay object.

Заметки

ms582172.alert_note(ru-ru,VS.90).gifПримечание.

The InkOverlay object must be disabled before setting this property. To disable the InkOverlay object, set the Enabled property to false. You can then set the Ink property, and re-enable the InkOverlay object by setting the Enabled property to true.

An InkOverlay object creates an Ink object by default. If two or more Ink objects exist on a known application window, they can be switched out to enable collection into any one of them (such as after deserializing one of the Ink objects).

Примеры

In this example, an InkOverlay object works with multiple virtual pages by maintaining multiple Ink objects.

Before pages can be switched, an array of Ink objects is initialized.

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

Then, in response to a user action (such as picking from a menu or list), the Ink object of the InkOverlay object is reassigned, and the control to which the InkOverlay object is attached is redrawn.

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

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

InkOverlay Класс

InkOverlay - члены

Microsoft.Ink - пространство имен

InkOverlay.Enabled

Ink