AnnotationService 클래스

정의

사용자 주석을 관리하고 표시하기 위한 Microsoft Annotations Framework의 핵심 서비스를 제공합니다.

public ref class AnnotationService sealed : System::Windows::Threading::DispatcherObject
public sealed class AnnotationService : System.Windows.Threading.DispatcherObject
type AnnotationService = class
    inherit DispatcherObject
Public NotInheritable Class AnnotationService
Inherits DispatcherObject
상속
AnnotationService

예제

다음 예제에서는 만드는 방법을 보여 하며 시작 합니다 AnnotationService.

// ------------------------ StartAnnotations --------------------------
/// <summary>
///   Enables annotations and displays all that are viewable.</summary>
private void StartAnnotations()
{
    // If there is no AnnotationService yet, create one.
    if (_annotService == null)
        // docViewer is a document viewing control named in Window1.xaml.
        _annotService = new AnnotationService(docViewer);

    // If the AnnotationService is currently enabled, disable it.
    if (_annotService.IsEnabled)
        _annotService.Disable();

    // Open a stream to the file for storing annotations.
    _annotStream = new FileStream(
        _annotStorePath, FileMode.OpenOrCreate, FileAccess.ReadWrite);

    // Create an AnnotationStore using the file stream.
    _annotStore = new XmlStreamStore(_annotStream);

    // Enable the AnnotationService using the new store.
    _annotService.Enable(_annotStore);
}// end:StartAnnotations()
' ------------------------ StartAnnotations --------------------------
''' <summary>
'''   Enables annotations and displays all that are viewable.</summary>
Private Sub StartAnnotations()
    ' If there is no AnnotationService yet, create one.
    If _annotService Is Nothing Then
        ' docViewer is a document viewing control named in Window1.xaml.
        _annotService = New AnnotationService(docViewer)
    End If

    ' If the AnnotationService is currently enabled, disable it.
    If _annotService.IsEnabled = True Then
        _annotService.Disable()
    End If

    ' Open a stream to the file for storing annotations.
    _annotStream = New FileStream(_annotStorePath, FileMode.OpenOrCreate, FileAccess.ReadWrite)

    ' Create an AnnotationStore using the file stream.
    _annotStore = New XmlStreamStore(_annotStream)

    ' Enable the AnnotationService using the new store.
    _annotService.Enable(_annotStore)
End Sub

생성자

Name Description
AnnotationService(DocumentViewerBase)

지정된 컨트롤 또는 FlowDocumentPageViewer 컨트롤에 사용할 클래스의 AnnotationService 새 인스턴스를 DocumentViewer 초기화합니다.

AnnotationService(FlowDocumentReader)

지정된 FlowDocumentReader 컨트롤에 사용할 클래스의 AnnotationService 새 인스턴스를 초기화합니다.

AnnotationService(FlowDocumentScrollViewer)

지정된 FlowDocumentScrollViewer 컨트롤에 사용할 클래스의 AnnotationService 새 인스턴스를 초기화합니다.

필드

Name Description
ClearHighlightsCommand

현재 선택 영역에서 강조 표시 주석을 지우는 명령을 나타냅니다.

CreateHighlightCommand

현재 선택 영역에 강조 표시 주석을 만드는 명령을 나타냅니다.

CreateInkStickyNoteCommand

현재 선택 영역에 잉크 메모 주석을 만드는 명령을 나타냅니다.

CreateTextStickyNoteCommand

현재 선택 영역에 텍스트 메모 주석을 만드는 명령을 나타냅니다.

DeleteAnnotationsCommand

현재 선택 영역의 모든 잉크 메모, 텍스트 메모 및 강조 표시 주석을 삭제하는 명령을 나타냅니다.

DeleteStickyNotesCommand

현재 선택 영역의 모든 잉크 메모 및 텍스트 메모 주석을 삭제하는 명령을 나타냅니다.

속성

Name Description
Dispatcher

연결된 이 값을 DispatcherDispatcherObject 가져옵니다.

(다음에서 상속됨 DispatcherObject)
IsEnabled

사용 여부를 AnnotationService 나타내는 값을 가져옵니다.

Store

AnnotationStore메서드에서 사용되는 값을 AnnotationService 가져옵니다.

메서드

Name Description
CheckAccess()

호출 스레드에 이 DispatcherObject액세스 권한이 있는지 여부를 확인합니다.

(다음에서 상속됨 DispatcherObject)
Disable()

주석 처리를 사용하지 않도록 설정하고 표시되는 모든 주석을 숨깁니다.

Enable(AnnotationStore)

AnnotationService 지정된 AnnotationStore 주석과 함께 사용할 수 있도록 설정하고 표시되는 모든 주석을 표시합니다.

Equals(Object)

지정한 개체와 현재 개체가 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetService(DocumentViewerBase)

AnnotationService 지정한 문서 보기 컨트롤과 연결된 인스턴스를 반환합니다.

GetService(FlowDocumentReader)

지정된 . AnnotationService 와 연결된 값을 반환합니다 FlowDocumentReader.

GetService(FlowDocumentScrollViewer)

지정된 . AnnotationService 와 연결된 값을 반환합니다 FlowDocumentScrollViewer.

GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)
VerifyAccess()

호출 스레드가 이에 DispatcherObject액세스할 수 있도록 합니다.

(다음에서 상속됨 DispatcherObject)

적용 대상