This documentation is archived and is not being maintained.
AnnotationStore.StoreContentChanged Event
Visual Studio 2008
Occurs when an Annotation is added to or deleted from the store.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: Not mapped to an xmlns.
The following example shows how to add an event delegate for the StoreContentChanged event. For the full sample, see the Document Serialization Sample.
// Enable Annotations _annotationBuffer = new MemoryStream(); _annStore = new XmlStreamStore(_annotationBuffer); _annServ = new AnnotationService(FDPV); _annStore.StoreContentChanged += new StoreContentChangedEventHandler(_annStore_StoreContentChanged); _annServ.Enable(_annStore);
The following example shows operation of the StoreContentChanged event delegate. For the full sample, see the Document Serialization Sample.
// ------------------ _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); else AddBookmarkOrComment(CommentsList, ann); } else { AddBookmarkOrComment(CommentsList, ann); } }
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: