Share via


AnnotationService.GetService 方法

定義

傳回與指定之文件檢視控制項關聯的 AnnotationService

多載

GetService(FlowDocumentReader)

傳回與指定 AnnotationService 關聯的 FlowDocumentReader

GetService(FlowDocumentScrollViewer)

傳回與指定 AnnotationService 關聯的 FlowDocumentScrollViewer

GetService(DocumentViewerBase)

傳回與指定之文件檢視控制項關聯的 AnnotationService 實例。

備註

方法 GetService 可用來傳回 AnnotationService 與下列檔檢視控制項相關聯的 :

與批註服務相關聯的檢視器控制項是在 建構函式的參數 AnnotationService 中指定。

GetService(FlowDocumentReader)

傳回與指定 AnnotationService 關聯的 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

參數

reader
FlowDocumentReader

要為其傳回 AnnotationService 實例的文件讀取器控制項。

傳回

與特定文件讀取器控制項關聯的 AnnotationService,如果指定的文件讀取器不含任何的 AnnotationService 則為 null

例外狀況

readernull

備註

方法 GetService 可用來傳回 AnnotationService 與下列檔檢視控制項相關聯的 :

與批註服務相關聯的檢視器控制項是在 建構函式的參數 AnnotationService 中指定。

另請參閱

適用於

GetService(FlowDocumentScrollViewer)

傳回與指定 AnnotationService 關聯的 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

參數

viewer
FlowDocumentScrollViewer

要為其傳回 AnnotationService 實例的文件檢視器控制項。

傳回

與特定文件檢視器控制項關聯的 AnnotationService,如果指定的檢視器控制項不含任何的 AnnotationService 則為 null

例外狀況

viewernull

備註

方法 GetService 可用來傳回 AnnotationService 與下列檔檢視控制項相關聯的 :

與批註服務相關聯的檢視器控制項是在 建構函式的參數 AnnotationService 中指定。

另請參閱

適用於

GetService(DocumentViewerBase)

傳回與指定之文件檢視控制項關聯的 AnnotationService 實例。

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

參數

viewer
DocumentViewerBase

要為其傳回 AnnotationService 實例的文件檢視控制項。

傳回

與特定文件檢視控制項關聯的 AnnotationService,如果指定的文件檢視控制項不含任何的 AnnotationService 則為 null

例外狀況

viewernull

備註

方法 GetService 可用來傳回 AnnotationService 與下列檔檢視控制項相關聯的 :

與批註服務相關聯的檢視器控制項是在 建構函式的參數 AnnotationService 中指定。

另請參閱

適用於