InkEdit.SelInks Property
Gets or sets the array of embedded Ink objects (if displayed as ink) in the current selection.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public Property SelInks As Ink()
'Usage
Dim instance As InkEdit
Dim value As Ink()
value = instance.SelInks
instance.SelInks = value
[BrowsableAttribute(false)]
public Ink[] SelInks { get; set; }
[BrowsableAttribute(false)]
public:
property array<Ink^>^ SelInks {
array<Ink^>^ get ();
void set (array<Ink^>^ value);
}
public function get SelInks () : Ink[]
public function set SelInks (value : Ink[])
Property Value
Type: array<Microsoft.Ink.Ink[]
The embedded Ink objects (if displayed as ink) in the current selection.
Remarks
Ink is displayed as ink in the InkEdit control if the InkInsertMode property is set to InsertAsInk.
You must recognize ink before you access it through this property. If you do not recognize the ink, the SelInks property contains zero Ink objects. You must either call the Recognize method (if the RecoTimeout value equals 0) or wait until the ink is automatically recognized (when the RecoTimeout value is greater than 0) to access it through this property.
The InkEdit control ignores any DrawingAttributes on ink set through the SelInks property. Instead, it applies alternate drawing attributes according to the attributes of nearby text.
This property is available at run time only. To select the ink, use the Select( ) method.
Examples
In this example, each Ink object in the SelInks property is saved to a file using Ink Serialized Format.
Private Sub SaveSelectedInk()
' if mInkEdit.InkInsertMode <> InkInsertMode.InsertAsInk
' or no ink is selected, then the SelInks array will have zero elements.
' Normally, we'd want to check this but for simplicty, we'll write the file anyway.
' Therefore, the file might be zero bytes long.
Using FS As FileStream = New FileStream("myInk.dat", FileMode.Create)
For Each I As Ink In mInkEdit.SelInks
Dim isf As Byte() = I.Save(PersistenceFormat.InkSerializedFormat)
FS.Write(isf, 0, isf.Length)
Next
End Using
End Sub
private void SaveSelectedInk()
{
// if mInkEdit.InkInsertMode != InkInsertMode.InsertAsInk
// or no ink is selected, then the SelInks array will have zero elements.
// Normally, we'd want to check this but for simplicty, we'll write the file anyway.
// Therefore, the file might be zero bytes long.
using (FileStream FS = new FileStream("myInk.dat",FileMode.Create))
{
foreach (Ink I in mInkEdit.SelInks)
{
byte[] isf = I.Save(PersistenceFormat.InkSerializedFormat);
FS.Write(isf, 0, isf.Length);
}
}
}
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0