Edit

Bagikan melalui


AnnotationStore.AddAnnotation(Annotation) Method

Definition

Adds a new Annotation to the store.

public:
 abstract void AddAnnotation(System::Windows::Annotations::Annotation ^ newAnnotation);
public abstract void AddAnnotation (System.Windows.Annotations.Annotation newAnnotation);
abstract member AddAnnotation : System.Windows.Annotations.Annotation -> unit
Public MustOverride Sub AddAnnotation (newAnnotation As Annotation)

Parameters

newAnnotation
Annotation

The annotation to add to the store.

Exceptions

newAnnotation is null.

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

Dispose has been called on the store.

Remarks

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.

Applies to

See also