AnnotationService Klasa

Definicja

Udostępnia podstawowe usługi platformy Microsoft Annotations Framework do zarządzania adnotacjami użytkowników i wyświetlania ich.

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
Dziedziczenie
AnnotationService

Przykłady

W poniższym przykładzie pokazano, jak utworzyć i uruchomić element 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

Konstruktory

AnnotationService(DocumentViewerBase)

Inicjuje AnnotationService nowe wystąpienie klasy do użycia z określoną DocumentViewer kontrolką lub FlowDocumentPageViewer .

AnnotationService(FlowDocumentReader)

Inicjuje AnnotationService nowe wystąpienie klasy do użycia z określoną FlowDocumentReader kontrolką.

AnnotationService(FlowDocumentScrollViewer)

Inicjuje AnnotationService nowe wystąpienie klasy do użycia z określoną FlowDocumentScrollViewer kontrolką.

Pola

ClearHighlightsCommand

Reprezentuje polecenie w celu wyczyszczenia adnotacji wyróżnienia z bieżącego zaznaczenia.

CreateHighlightCommand

Reprezentuje polecenie , aby utworzyć adnotację wyróżnienia dla bieżącego zaznaczenia.

CreateInkStickyNoteCommand

Reprezentuje polecenie , aby utworzyć adnotację pisma odwrotowego dla bieżącego zaznaczenia.

CreateTextStickyNoteCommand

Reprezentuje polecenie do utworzenia adnotacji tekstowej dla bieżącego zaznaczenia.

DeleteAnnotationsCommand

Reprezentuje polecenie umożliwiające usunięcie wszystkich adnotacji pisma odk-notatki, tekstu i wyróżniania adnotacji w bieżącym zaznaczeniu.

DeleteStickyNotesCommand

Reprezentuje polecenie, aby usunąć wszystkie adnotacje notatek od pisma odwrotowego i tekstowego w bieżącym zaznaczeniu.

Właściwości

Dispatcher

Dispatcher Pobiera tę DispatcherObject wartość skojarzona z.

(Odziedziczone po DispatcherObject)
IsEnabled

Pobiera wartość wskazującą, czy AnnotationService parametr jest włączony.

Store

Pobiera element AnnotationStore używany przez ten AnnotationServiceelement .

Metody

CheckAccess()

Określa, czy wątek wywołujący ma dostęp do tego DispatcherObjectelementu .

(Odziedziczone po DispatcherObject)
Disable()

Wyłącza przetwarzanie adnotacji i ukrywa wszystkie widoczne adnotacje.

Enable(AnnotationStore)

AnnotationService Włącza element do użycia z danym AnnotationStore elementem i wyświetla wszystkie widoczne adnotacje.

Equals(Object)

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.

(Odziedziczone po Object)
GetHashCode()

Służy jako domyślna funkcja skrótu.

(Odziedziczone po Object)
GetService(DocumentViewerBase)

AnnotationService Zwraca wystąpienie skojarzone z określoną kontrolką wyświetlania dokumentów.

GetService(FlowDocumentReader)

Zwraca wartość AnnotationService skojarzona z określonym FlowDocumentReaderelementem .

GetService(FlowDocumentScrollViewer)

Zwraca wartość AnnotationService skojarzona z określonym FlowDocumentScrollViewerelementem .

GetType()

Type Pobiera wartość bieżącego wystąpienia.

(Odziedziczone po Object)
MemberwiseClone()

Tworzy płytkią kopię bieżącego Objectelementu .

(Odziedziczone po Object)
ToString()

Zwraca ciąg reprezentujący bieżący obiekt.

(Odziedziczone po Object)
VerifyAccess()

Wymusza, że wątek wywołujący ma dostęp do tego DispatcherObjectelementu .

(Odziedziczone po DispatcherObject)

Dotyczy