StoreContentChanged Event
Collapse the table of content
Expand the table of content

AnnotationStore.StoreContentChanged Event

Occurs when an Annotation is added to or deleted from the store.

Namespace:  System.Windows.Annotations.Storage
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: Not mapped to an xmlns.

public event StoreContentChangedEventHandler StoreContentChanged
<object StoreContentChanged="StoreContentChangedEventHandler" .../>

The following example shows how to add an event delegate for the StoreContentChanged event.

// Enable Annotations
_annotationBuffer = new MemoryStream();
_annStore = new XmlStreamStore(_annotationBuffer);
_annServ  = new AnnotationService(FDPV);
_annStore.StoreContentChanged +=
    new StoreContentChangedEventHandler(_annStore_StoreContentChanged);

The following example shows operation of the StoreContentChanged event delegate.

// ------------------ _annStore_StoreContentChanged -------------------
void _annStore_StoreContentChanged(object sender, StoreContentChangedEventArgs e)
    if (e.Action == StoreContentAction.Deleted) return;
    Annotation ann = e.Annotation;
    if (ann.Cargos.Count > 0)
        AnnotationResource annResource = ann.Cargos[0] as AnnotationResource;
        if (annResource.Name == "Highlight")
            AddBookmarkOrComment(BookmarkList, ann);
            AddBookmarkOrComment(CommentsList, ann);
        AddBookmarkOrComment(CommentsList, ann);

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

© 2016 Microsoft