Langue

AnnotationHelper.CreateInkStickyNoteForSelection Méthode

Définition

Crée une annotation de note collante manuscrite sur la sélection actuelle du contrôle visionneuse associé au paramètre spécifié AnnotationService.

public:
 static System::Windows::Annotations::Annotation ^ CreateInkStickyNoteForSelection(System::Windows::Annotations::AnnotationService ^ service, System::String ^ author);
public static System.Windows.Annotations.Annotation CreateInkStickyNoteForSelection(System.Windows.Annotations.AnnotationService service, string author);
static member CreateInkStickyNoteForSelection : System.Windows.Annotations.AnnotationService * string -> System.Windows.Annotations.Annotation
Public Shared Function CreateInkStickyNoteForSelection (service As AnnotationService, author As String) As Annotation

Paramètres

service
AnnotationService

Service d’annotation à utiliser pour créer l’annotation de note collante manuscrite.

author
String

Auteur de l’annotation.

Retours

Annotation de note collante manuscrite ; ou null, s’il n’y a pas de contenu sélectionné à annoter.

Exceptions

service a la valeur null.

service n’est pas activé.

Le contrôle visionneuse ne contient aucune sélection de contenu.

Remarques

L’annotation de note d’entrée manuscrite est ancrée dans le contenu défini par la sélection actuelle du DocumentViewerBaseconstructeur , , DocumentViewerFlowDocumentPageViewerFlowDocumentScrollViewerou FlowDocumentReader contrôle spécifié au AnnotationService constructeur.

S’il n’existe aucun contenu sélectionné par l’utilisateur (la longueur de sélection est égale à zéro), aucune annotation n’est créée et une InvalidOperationException exception est levée.

author peut être spécifié comme null dans le cas où aucun auteur n’est défini.

L’annotation service donnée doit être activée au moyen d’un appel avant AnnotationService.Enable l’appel CreateInkStickyNoteForSelection.

S’applique à

Voir aussi