Freigeben über


PdfView.SelectionChangedNotification Eigenschaft

Definition

Benachrichtigungskonstante für SelectionChanged

[Foundation.Advice("Use PdfView.Notifications.ObserveSelectionChanged helper method instead.")]
[Foundation.Field("PDFViewSelectionChangedNotification", "PDFKit")]
public static Foundation.NSString SelectionChangedNotification { get; }
[Foundation.Advice("Use PdfView.Notifications.ObserveSelectionChanged helper method instead.")]
[Foundation.Field("PDFViewSelectionChangedNotification", "Quartz")]
public static Foundation.NSString SelectionChangedNotification { get; }
member this.SelectionChangedNotification : Foundation.NSString

Eigenschaftswert

Die NSString-Konstante sollte als Token für NSNotificationCenter verwendet werden.

Attribute

Hinweise

Diese Konstante kann mit dem NSNotificationCenter verwendet werden, um einen Listener für diese Benachrichtigung zu registrieren, auch Entwickler können stattdessen die stark typisierte Benachrichtigung ObserveSelectionChanged verwenden. Dies ist ein NSString anstelle einer Zeichenfolge, da diese Werte als Token in einigen nativen Bibliotheken verwendet werden können, anstatt nur für ihren tatsächlichen Zeichenfolgeninhalt verwendet zu werden. Der Parameter "notification" für den Rückruf enthält zusätzliche Informationen, die für den Benachrichtigungstyp spezifisch sind.

// Lambda style
NSNotificationCenter.DefaultCenter.AddObserver (
        PdfView.SelectionChangedNotification, (notification) => {Console.WriteLine ("Received the notification PdfView", notification); }


// Method style
void Callback (NSNotification notification)
{
    Console.WriteLine ("Received a notification PdfView", notification);
}

void Setup ()
{
    NSNotificationCenter.DefaultCenter.AddObserver (PdfView.SelectionChangedNotification, Callback);
}

Gilt für: