AnnotationStore.StoreContentChanged Événement
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Se produit lorsqu'une Annotation est ajoutée ou supprimée du magasin.
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
Type d'événement
Exemples
L’exemple suivant montre comment ajouter un délégué d’événement pour l’événement StoreContentChanged .
// Enable Annotations
_annotationBuffer = new MemoryStream();
_annStore = new XmlStreamStore(_annotationBuffer);
_annServ = new AnnotationService(FDPV);
_annStore.StoreContentChanged +=
new StoreContentChangedEventHandler(_annStore_StoreContentChanged);
_annServ.Enable(_annStore);
L’exemple suivant montre le fonctionnement du délégué d’événement StoreContentChanged .
// ------------------ _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);
}
}
S’applique à
Voir aussi
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour