AnnotationHelper.CreateTextStickyNoteForSelection メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した AnnotationServiceに関連付けられているビューアー コントロールの現在の選択範囲にテキスト付箋注釈を作成します。
public:
static System::Windows::Annotations::Annotation ^ CreateTextStickyNoteForSelection(System::Windows::Annotations::AnnotationService ^ service, System::String ^ author);
public static System.Windows.Annotations.Annotation CreateTextStickyNoteForSelection(System.Windows.Annotations.AnnotationService service, string author);
static member CreateTextStickyNoteForSelection : System.Windows.Annotations.AnnotationService * string -> System.Windows.Annotations.Annotation
Public Shared Function CreateTextStickyNoteForSelection (service As AnnotationService, author As String) As Annotation
パラメーター
- service
- AnnotationService
テキスト付箋注釈の作成に使用する注釈サービス。
- author
- String
注釈の作成者。
返品
テキスト付箋注釈。または null(注釈を付けるコンテンツが選択されていない場合)。
例外
service は nullです。
service が有効になっていません。
ビューアー コントロールにコンテンツの選択が含まれています。
注釈
テキスト付箋注釈は、DocumentViewerBase、DocumentViewer、FlowDocumentPageViewer、FlowDocumentScrollViewer、またはFlowDocumentReader コンストラクターに指定されたコントロールの現在の選択によって定義AnnotationServiceコンテンツに固定されます。
ユーザーが選択したコンテンツがない場合 (選択の長さが 0 の場合)、注釈は作成されず、 InvalidOperationException がスローされます。
author は、 null として指定できます。その場合、作成者は定義されていません。
指定された注釈serviceは、AnnotationService.Enableを呼び出す前にCreateTextStickyNoteForSelectionを呼び出すことによって有効にする必要があります。