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


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

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

Gets a copy of the Strokes collection contained in the Ink object.

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

Синтаксис

'Декларация
Public ReadOnly Property Strokes As Strokes
'Применение
Dim instance As Ink
Dim value As Strokes

value = instance.Strokes
public Strokes Strokes { get; }
public:
property Strokes^ Strokes {
    Strokes^ get ();
}
/** @property */
public Strokes get_Strokes()
public function get Strokes () : Strokes

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

Тип: Microsoft.Ink.Strokes
A copy of the Strokes collection contained in the Ink object.

Заметки

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

The Strokes property for the Ink object does not return the actual collection that the Ink object works with, but instead returns a copy. For example, this means that adding or removing strokes to this collection does not affect the Ink object's strokes; to add or remove strokes, use Ink methods such as AddStrokesAtRectangle, DeleteStroke, and DeleteStrokes. However, each stroke in the collection is a reference to the original Stroke object.

Instances of Strokes collections which are obtained from an Ink object using this method are not garbage collected. In order to avoid a memory leak, any time that you are working with one of these collections, make use of the using statement as shown below.

using (Strokes strokes = myInk.Strokes)
{
    int i = strokes.Count;
}

Примеры

This C# example gets the number of strokes that have been collected by an InkCollector object, theInkCollector.

using (Strokes strokes = theInkCollector.Ink.Strokes)
{
    int numberOfStrokes = strokes.Count;
}

This Microsoft Visual Basic.NET example gets the number of strokes that have been collected by an InkCollector object, theInkCollector.

Dim numberOfStrokes As Integer 
Using strokes As Microsoft.Ink.Strokes = theInkCollector.Ink.Strokes
    numberOfStrokes = strokes.Count()
End Using

Платформы

Windows Vista

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

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

.NET Framework

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

См. также

Ссылки

Ink Класс

Ink - члены

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

Strokes

Stroke

Ink.CustomStrokes