InkEdit.SelInks - свойство
Обновлен: Ноябрь 2007
Gets or sets the array of embedded Ink objects (if displayed as ink) in the current selection.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
<BrowsableAttribute(False)> _
Public Property SelInks As Ink()
'Применение
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);
}
/** @property */
/** @attribute BrowsableAttribute(false) */
public Ink[] get_SelInks()
/** @property */
/** @attribute BrowsableAttribute(false) */
public void set_SelInks(Ink[] value)
public function get SelInks () : Ink[]
public function set SelInks (value : Ink[])
Значение свойства
Тип: array<Microsoft.Ink.Ink[]
The embedded Ink objects (if displayed as ink) in the current selection.
Заметки
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.
Примеры
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);
}
}
}
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0