Freigeben über


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)
XML Namespace:  https://schemas.microsoft.com/winfx/2006/xaml/presentation

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;
}
/** @property */
public final Object get_SyncRoot ()
public final function get SyncRoot () : Object
Not applicable.

Property Value

An object that can be used to synchronize access to the collection.

Remarks

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

Example

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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkRecognizerCollection Class
InkRecognizerCollection Members
System.Windows.Ink Namespace