AnnotationService Classe

Definição

Fornece os serviços principais do Microsoft Annotations Framework para gerenciar e exibir anotações do usuário.

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
Herança
AnnotationService

Exemplos

O exemplo a seguir mostra como criar e iniciar um 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

Construtores

AnnotationService(DocumentViewerBase)

Inicializa uma nova instância da classe AnnotationService para uso com um controle DocumentViewer ou FlowDocumentPageViewer especificado.

AnnotationService(FlowDocumentReader)

Inicializa uma nova instância da classe AnnotationService para uso com um controle FlowDocumentReader especificado.

AnnotationService(FlowDocumentScrollViewer)

Inicializa uma nova instância da classe AnnotationService para uso com um controle FlowDocumentScrollViewer especificado.

Campos

ClearHighlightsCommand

Representa o comando para limpar anotações de destaque da seleção atual.

CreateHighlightCommand

Representa o comando para criar uma anotação de destaque na seleção atual.

CreateInkStickyNoteCommand

Representa o comando para criar uma anotação de nota à tinta na seleção atual.

CreateTextStickyNoteCommand

Representa o comando para criar uma anotação de nota de texto na seleção atual.

DeleteAnnotationsCommand

Representa o comando para excluir todas as anotações de nota à tinta, nota de texto e realce na seleção atual.

DeleteStickyNotesCommand

Representa o comando para excluir todas as anotações de nota à tinta e nota de texto na seleção atual.

Propriedades

Dispatcher

Obtém o Dispatcher ao qual este DispatcherObject está associado.

(Herdado de DispatcherObject)
IsEnabled

Obtém um valor que indica se o AnnotationService está habilitado.

Store

Obtém o AnnotationStore usado por este AnnotationService.

Métodos

CheckAccess()

Determina se o thread de chamada tem acesso a este DispatcherObject.

(Herdado de DispatcherObject)
Disable()

Desabilita o processamento de anotações e oculta todas as anotações visíveis.

Enable(AnnotationStore)

Habilita o AnnotationService para uso com um determinado AnnotationStore e exibe todas as anotações visíveis.

Equals(Object)

Determina se o objeto especificado é igual ao objeto atual.

(Herdado de Object)
GetHashCode()

Serve como a função de hash padrão.

(Herdado de Object)
GetService(DocumentViewerBase)

Retorna a instância do AnnotationService associada a um controle de exibição de documento especificado.

GetService(FlowDocumentReader)

Retorna o AnnotationService associado a um FlowDocumentReader especificado.

GetService(FlowDocumentScrollViewer)

Retorna o AnnotationService associado a um FlowDocumentScrollViewer especificado.

GetType()

Obtém o Type da instância atual.

(Herdado de Object)
MemberwiseClone()

Cria uma cópia superficial do Object atual.

(Herdado de Object)
ToString()

Retorna uma cadeia de caracteres que representa o objeto atual.

(Herdado de Object)
VerifyAccess()

Impõe que o thread de chamada tenha acesso a este DispatcherObject.

(Herdado de DispatcherObject)

Aplica-se a