AnnotationStore.StoreContentChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when an Annotation is added to or deleted from the store.
public:
event System::Windows::Annotations::Storage::StoreContentChangedEventHandler ^ StoreContentChanged;
public event System.Windows.Annotations.Storage.StoreContentChangedEventHandler StoreContentChanged;
member this.StoreContentChanged : System.Windows.Annotations.Storage.StoreContentChangedEventHandler
Public Custom Event StoreContentChanged As StoreContentChangedEventHandler
Public Event StoreContentChanged As StoreContentChangedEventHandler
Event Type
Examples
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);
_annServ.Enable(_annStore);
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);
else
AddBookmarkOrComment(CommentsList, ann);
}
else
{
AddBookmarkOrComment(CommentsList, ann);
}
}
Applies to
See also
Sodelujte z nami v storitvi GitHub
Vir za to vsebino najdete v storitvi GitHub, kjer lahko tudi ustvarite in pregledate težave in zahtevke za uveljavitev sprememb. Če želite več informacij, glejte naš vodnik za sodelavce.