AnnotationStore.StoreContentChanged Evento
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Se produce cuando se agrega o elimina Annotation del almacén.
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
Tipo de evento
Ejemplos
En el ejemplo siguiente se muestra cómo agregar un delegado de eventos para el StoreContentChanged evento.
// Enable Annotations
_annotationBuffer = new MemoryStream();
_annStore = new XmlStreamStore(_annotationBuffer);
_annServ = new AnnotationService(FDPV);
_annStore.StoreContentChanged +=
new StoreContentChangedEventHandler(_annStore_StoreContentChanged);
_annServ.Enable(_annStore);
En el ejemplo siguiente se muestra el funcionamiento del delegado de StoreContentChanged eventos.
// ------------------ _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);
}
}
Se aplica a
Consulte también
Comentarios
https://aka.ms/ContentUserFeedback.
Próximamente: A lo largo de 2024 iremos eliminando gradualmente GitHub Issues como mecanismo de comentarios sobre el contenido y lo sustituiremos por un nuevo sistema de comentarios. Para más información, vea:Enviar y ver comentarios de