AnnotationStore.AddAnnotation Method (Annotation)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Adds a new Annotation to the store.

Namespace:   System.Windows.Annotations.Storage
Assembly:  PresentationFramework (in PresentationFramework.dll)

public abstract void AddAnnotation(
	Annotation newAnnotation
)

Parameters

newAnnotation
Type: System.Windows.Annotations.Annotation

The annotation to add to the store.

Exception Condition
ArgumentNullException

newAnnotation is null.

ArgumentException

An Annotation with the same Id property value already exists in the store.

ObjectDisposedException

Dispose has been called on the store.

When a new Annotation is added to the store its globally unique identifier (GUID) Id property is set to a new value. When AddAnnotation is called, its Id property is checked to see if the Annotation already has been added to the store. If the Annotation already has been added and exists in the store (as determined by its Id property) an ArgumentException error is thrown.

.NET Framework
Available since 3.0
Return to top
Show: