Compartilhar via


Strokes.Count Property

Strokes.Count Property

Gets the number of Stroke objects contained in the Strokes collection.

Definition

Visual Basic .NET Public ReadOnly Property Count As Integer
C# public int Count { get; }
Managed C++ public: __property int* get_Count();

Property Value

System.Int32. The number of Stroke objects contained in the Strokes collection.

This property is read-only. This property has no default value.

Exceptions

ObjectDisposedException Leave Site:

Examples

[C#]

This C# example gets the number of Stroke objects within the Strokes collection of an InkPicture control, theInkPicture, and updates the contents of a text box control, theTextBox.

// Get the collecton of strokes in the InkPicture control.
Microsoft.Ink.Strokes theStrokes = theInkPicture.Ink.Strokes;

// Add the number of strokes to the TextBox.
theTextBox.Text = theStrokes.Count.ToString();

[Visual Basic .NET]

This Microsoft® Visual Basic® .NET example gets the number of Stroke objects within the Strokes collection of an InkPicture control, theInkPicture, and updates the contents of a text box control, theTextBox.

' Get the collecton of strokes in the InkPicture control.
Dim theStrokes As Microsoft.Ink.Strokes = theInkPicture.Ink.Strokes

' Add the number of strokes to the TextBox.
theTextBox.Text = theStrokes.Count

See Also