AnnotationService::GetService Method (DocumentViewerBase^)
.NET Framework (current version)
Returns the AnnotationService instance associated with a specified document viewing control.
Assembly: PresentationFramework (in PresentationFramework.dll)
Parameters
- viewer
-
Type:
System.Windows.Controls.Primitives::DocumentViewerBase^
The document viewing control to return the AnnotationService instance for.
Return Value
Type: System.Windows.Annotations::AnnotationService^The AnnotationService associated with the given document viewing control; or null if the specified document viewing control has no AnnotationService.
| Exception | Condition |
|---|---|
| ArgumentNullException | viewer is null. |
The GetService method can be used to return the AnnotationService associated with the following document viewing controls:
DocumentViewerBase derived subclasses
The viewer control associated with the annotation service is specified in the parameter to the AnnotationService constructor.
.NET Framework
Available since 3.0
Available since 3.0
Show: