次の方法で共有


InkPicture.Ink Property

InkPicture.Ink Property

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

Definition

Visual Basic .NET Public Property Ink As Ink
C# public Ink Ink { get; set; }
Managed C++ public: __property Ink* get_Ink();
public: __property void set_Ink(Ink*);

Property Value

Microsoft.Ink.Ink. The Ink object that is associated with the InkPicture object.

This property is read/write. This property has no default value.

Exceptions

ArgumentNullException Leave Site:
COMException Leave Site:
InvalidOperationException Leave Site: The ink cannot be changed while the InkCollector is actively collecting ink.
ObjectDisposedException Leave Site:

Remarks

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

An InkPicture 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).

Examples

[C#]

This C# example returns the associated Ink object for an InkPicture, theInkPicture.

Ink theInk = theInkPicture.Ink;

[VB.NET]

This Microsoft® Visual Basic® .NET example returns the associated Ink object for an InkPicture, theInkPicture.

Dim theInk as Ink = theInkPicture.Ink

See Also