TX Text Control .NET for WPF

SyncRoot Property

Property|Introduced in 30.0
Explicit
Implements System.Collections.ICollection explicitly: cast to the interface to use it.
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

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

Syntax

The type implements this member of System.Collections.ICollection explicitly: code reaches it by casting to the interface, as in ((ICollection)value).SyncRoot.

object ICollection.SyncRoot { get; }

Examples

The following example works with comments in the current document by using CommentCollection.syncroot.

CommentCollection commentCollection = textControl.Comments;
textControl.Text = "Payment is due within 30 days.";
textControl.Select(0, textControl.Text.Length);
commentCollection.Add(new CommentedText("Verify the payment term."));

ICollection collection = commentCollection;
var value = collection.SyncRoot;

Limitations

Read only.