AnnotationService.GetService Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the AnnotationService associated with a specified document viewing control.
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. |
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.
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:
DocumentViewerBase derived subclasses
The viewer control associated with the annotation service is specified in the parameter to the AnnotationService constructor.
See also
Applies to
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
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:
DocumentViewerBase derived subclasses
The viewer control associated with the annotation service is specified in the parameter to the AnnotationService constructor.
See also
Applies to
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
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:
DocumentViewerBase derived subclasses
The viewer control associated with the annotation service is specified in the parameter to the AnnotationService constructor.
See also
Applies to
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: