次の方法で共有


PdfView.Notifications.ObserveAnnotationWillHit メソッド

定義

オーバーロード

ObserveAnnotationWillHit(EventHandler<NSNotificationEventArgs>)

定数に対して AnnotationWillHitNotification 厳密に型指定された通知。

ObserveAnnotationWillHit(NSObject, EventHandler<NSNotificationEventArgs>)

定数に対して AnnotationWillHitNotification 厳密に型指定された通知。

ObserveAnnotationWillHit(EventHandler<NSNotificationEventArgs>)

定数に対して AnnotationWillHitNotification 厳密に型指定された通知。

public static Foundation.NSObject ObserveAnnotationWillHit (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveAnnotationWillHit : EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject

パラメーター

handler
EventHandler<NSNotificationEventArgs>

通知が投稿されたときに呼び出すメソッド。

戻り値

通知を破棄するか、またはに渡すことによって通知の受信を停止するために使用できるトークン オブジェクト RemoveObservers(IEnumerable<NSObject>)

注釈

このメソッドは、通知を AnnotationWillHitNotification サブスクライブするために使用できます。

// Listen to all notifications posted for any object
var token = PdfView.Notifications.ObserveAnnotationWillHit ((notification) => {
	Console.WriteLine ("Observed AnnotationWillHitNotification!");
};

// Listen to all notifications posted for a single object
var token = PdfView.Notifications.ObserveAnnotationWillHit (objectToObserve, (notification) => {
	Console.WriteLine ($"Observed AnnotationWillHitNotification for {nameof (objectToObserve)}!");
};

// Stop listening for notifications
token.Dispose ();

適用対象

ObserveAnnotationWillHit(NSObject, EventHandler<NSNotificationEventArgs>)

定数に対して AnnotationWillHitNotification 厳密に型指定された通知。

public static Foundation.NSObject ObserveAnnotationWillHit (Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveAnnotationWillHit : Foundation.NSObject * EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject

パラメーター

objectToObserve
NSObject

観察するオブジェクト。

handler
EventHandler<NSNotificationEventArgs>

通知が投稿されたときに呼び出すメソッド。

戻り値

通知を破棄するか、またはに渡すことによって通知の受信を停止するために使用できるトークン オブジェクト RemoveObservers(IEnumerable<NSObject>)

注釈

このメソッドは、通知を AnnotationWillHitNotification サブスクライブするために使用できます。

// Listen to all notifications posted for any object
var token = PdfView.Notifications.ObserveAnnotationWillHit ((notification) => {
	Console.WriteLine ("Observed AnnotationWillHitNotification!");
};

// Listen to all notifications posted for a single object
var token = PdfView.Notifications.ObserveAnnotationWillHit (objectToObserve, (notification) => {
	Console.WriteLine ($"Observed AnnotationWillHitNotification for {nameof (objectToObserve)}!");
};

// Stop listening for notifications
token.Dispose ();

適用対象