Szerkesztés

Megosztás a következőn keresztül:


AnnotationService.GetService Method

Definition

Returns the AnnotationService associated with a specified document viewing control.

Overloads

GetService(FlowDocumentReader)

Returns the AnnotationService associated with a specified FlowDocumentReader.

GetService(FlowDocumentScrollViewer)

Returns the AnnotationService associated with a specified FlowDocumentScrollViewer.

GetService(DocumentViewerBase)

Returns the AnnotationService instance associated with a specified document viewing control.

Remarks

The GetService method can be used to return the AnnotationService associated with the following document viewing controls:

The viewer control associated with the annotation service is specified in the parameter to the AnnotationService constructor.

GetService(FlowDocumentReader)

Returns the AnnotationService associated with a specified FlowDocumentReader.

public:
 static System::Windows::Annotations::AnnotationService ^ GetService(System::Windows::Controls::FlowDocumentReader ^ reader);
public static System.Windows.Annotations.AnnotationService GetService (System.Windows.Controls.FlowDocumentReader reader);
static member GetService : System.Windows.Controls.FlowDocumentReader -> System.Windows.Annotations.AnnotationService
Public Shared Function GetService (reader As FlowDocumentReader) As AnnotationService

Parameters

reader
FlowDocumentReader

The document reader control to return the AnnotationService instance for.

Returns

The AnnotationService associated with the given document reader control; or null if the specified document reader has no AnnotationService.

Exceptions

reader is null.

Remarks

The GetService method can be used to return the AnnotationService associated with the following document viewing controls:

The viewer control associated with the annotation service is specified in the parameter to the AnnotationService constructor.

See also

Applies to

GetService(FlowDocumentScrollViewer)

Returns the AnnotationService associated with a specified FlowDocumentScrollViewer.

public:
 static System::Windows::Annotations::AnnotationService ^ GetService(System::Windows::Controls::FlowDocumentScrollViewer ^ viewer);
public static System.Windows.Annotations.AnnotationService GetService (System.Windows.Controls.FlowDocumentScrollViewer viewer);
static member GetService : System.Windows.Controls.FlowDocumentScrollViewer -> System.Windows.Annotations.AnnotationService
Public Shared Function GetService (viewer As FlowDocumentScrollViewer) As AnnotationService

Parameters

viewer
FlowDocumentScrollViewer

The document viewer control to return the AnnotationService instance for.

Returns

The AnnotationService associated with the given document viewer control; or null if the specified viewer control has no AnnotationService.

Exceptions

viewer is null.

Remarks

The GetService method can be used to return the AnnotationService associated with the following document viewing controls:

The viewer control associated with the annotation service is specified in the parameter to the AnnotationService constructor.

See also

Applies to

GetService(DocumentViewerBase)

Returns the AnnotationService instance associated with a specified document viewing control.

public:
 static System::Windows::Annotations::AnnotationService ^ GetService(System::Windows::Controls::Primitives::DocumentViewerBase ^ viewer);
public static System.Windows.Annotations.AnnotationService GetService (System.Windows.Controls.Primitives.DocumentViewerBase viewer);
static member GetService : System.Windows.Controls.Primitives.DocumentViewerBase -> System.Windows.Annotations.AnnotationService
Public Shared Function GetService (viewer As DocumentViewerBase) As AnnotationService

Parameters

viewer
DocumentViewerBase

The document viewing control to return the AnnotationService instance for.

Returns

The AnnotationService associated with the given document viewing control; or null if the specified document viewing control has no AnnotationService.

Exceptions

viewer is null.

Remarks

The GetService method can be used to return the AnnotationService associated with the following document viewing controls:

The viewer control associated with the annotation service is specified in the parameter to the AnnotationService constructor.

See also

Applies to