Sdílet prostřednictvím


Strokes.Count Property

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

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public ReadOnly Property Count As Integer
'Usage
Dim instance As Strokes 
Dim value As Integer 

value = instance.Count
public int Count { get; }
public:
virtual property int Count {
    int get () sealed;
}
public final function get Count () : int

Property Value

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

Implements

ICollection.Count

Examples

This example gets the number of Stroke objects contained within a Strokes collection, and updates a the text of label with that count.

' Access to the Strokes property returns a copy of the Strokes object 
' This copy must be implicitly (via using statement) or explicitly 
' disposed of in order to avoid a memory leak 
Using S As Strokes = mInkOverlay.Ink.Strokes
    Dim sCount As Integer = S.Count
    labelNumStrokes.Text = sCount.ToString()
End Using
// Access to the Strokes property returns a copy of the Strokes object. 
// This copy must be implicitly (via using statement) or explicitly 
// disposed of in order to avoid a memory leak. 
using (Strokes S = mInkOverlay.Ink.Strokes)
{
    int sCount = S.Count;
    labelNumStrokes.Text = sCount.ToString();
}

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

See Also

Reference

Strokes Class

Strokes Members

Microsoft.Ink Namespace

Stroke

Other Resources

System.Collections.ICollection Interface