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 == true)
        _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

생성자

AnnotationService(DocumentViewerBase)

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

AnnotationService(FlowDocumentReader)

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

AnnotationService(FlowDocumentScrollViewer)

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

필드

ClearHighlightsCommand

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

CreateHighlightCommand

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

CreateInkStickyNoteCommand

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

CreateTextStickyNoteCommand

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

DeleteAnnotationsCommand

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

DeleteStickyNotesCommand

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

속성

Dispatcher

Dispatcher와 연결된 DispatcherObject를 가져옵니다.

(다음에서 상속됨 DispatcherObject)
IsEnabled

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

Store

AnnotationStore에서 사용하는 AnnotationService를 가져옵니다.

메서드

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)

적용 대상