Share via


InkRecognizerCollection.SyncRoot Property

Gets an object that can be used to synchronize access to the collection.

Namespace:  System.Windows.Ink
Assembly:  IAWinFX (in IAWinFX.dll)

Syntax

'Declaration
Public ReadOnly Property SyncRoot As Object
'Usage
Dim instance As InkRecognizerCollection 
Dim value As Object 

value = instance.SyncRoot
public Object SyncRoot { get; }
public:
virtual property Object^ SyncRoot {
    Object^ get () sealed;
}
public final function get SyncRoot () : Object

Property Value

Type: System.Object
An object that can be used to synchronize access to the collection.

Implements

ICollection.SyncRoot

Remarks

This collection implements the ICollection interface. For more information about this property, see SyncRoot.

Examples

The following example shows how to lock the InkRecognizerCollection, theInkRecognizerCollection, while the contents of the collection are processed.

' Lock the InkRecognizerCollection.
SyncLock theInkRecognizers.SyncRoot

    ' Iterate over the locked collection. 
    For Each theInkRecognizer As InkRecognizer In theInkRecognizers
        ' Insert code here. 
    Next theInkRecognizer

End SyncLock
// Lock the InkRecognizerCollection.
lock (theInkRecognizers.SyncRoot)
{
    // Iterate over the locked collection. 
    foreach (InkRecognizer theInkRecognizer
        in theInkRecognizers)
    {
        // Insert code here.
    }
}

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

InkRecognizerCollection Class

InkRecognizerCollection Members

System.Windows.Ink Namespace