WKInterfaceObject.Notifications.ObserveDarkerSystemColorsStatusDidChange Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Overload
ObserveDarkerSystemColorsStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>) |
Pemberitahuan yang ditik dengan kuat untuk DarkerSystemColorsStatusDidChangeNotification konstanta. |
ObserveDarkerSystemColorsStatusDidChange(EventHandler<NSNotificationEventArgs>) |
Pemberitahuan yang ditik dengan kuat untuk DarkerSystemColorsStatusDidChangeNotification konstanta. |
ObserveDarkerSystemColorsStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)
Pemberitahuan yang ditik dengan kuat untuk DarkerSystemColorsStatusDidChangeNotification konstanta.
public static Foundation.NSObject ObserveDarkerSystemColorsStatusDidChange (Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveDarkerSystemColorsStatusDidChange : Foundation.NSObject * EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
Parameter
- objectToObserve
- NSObject
Objek yang akan diamati.
- handler
- EventHandler<NSNotificationEventArgs>
Metode untuk memanggil saat pemberitahuan diposting.
Mengembalikan
Objek token yang dapat digunakan untuk berhenti menerima pemberitahuan dengan membuangnya atau meneruskannya ke RemoveObservers(IEnumerable<NSObject>)
Keterangan
Metode ini dapat digunakan untuk berlangganan DarkerSystemColorsStatusDidChangeNotification pemberitahuan.
// Listen to all notifications posted for any object
var token = WKInterfaceObject.Notifications.ObserveDarkerSystemColorsStatusDidChange ((notification) => {
Console.WriteLine ("Observed DarkerSystemColorsStatusDidChangeNotification!");
};
// Listen to all notifications posted for a single object
var token = WKInterfaceObject.Notifications.ObserveDarkerSystemColorsStatusDidChange (objectToObserve, (notification) => {
Console.WriteLine ($"Observed DarkerSystemColorsStatusDidChangeNotification for {nameof (objectToObserve)}!");
};
// Stop listening for notifications
token.Dispose ();
Berlaku untuk
ObserveDarkerSystemColorsStatusDidChange(EventHandler<NSNotificationEventArgs>)
Pemberitahuan yang ditik dengan kuat untuk DarkerSystemColorsStatusDidChangeNotification konstanta.
public static Foundation.NSObject ObserveDarkerSystemColorsStatusDidChange (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveDarkerSystemColorsStatusDidChange : EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
Parameter
- handler
- EventHandler<NSNotificationEventArgs>
Metode untuk memanggil saat pemberitahuan diposting.
Mengembalikan
Objek token yang dapat digunakan untuk berhenti menerima pemberitahuan dengan membuangnya atau meneruskannya ke RemoveObservers(IEnumerable<NSObject>)
Keterangan
Metode ini dapat digunakan untuk berlangganan DarkerSystemColorsStatusDidChangeNotification pemberitahuan.
// Listen to all notifications posted for any object
var token = WKInterfaceObject.Notifications.ObserveDarkerSystemColorsStatusDidChange ((notification) => {
Console.WriteLine ("Observed DarkerSystemColorsStatusDidChangeNotification!");
};
// Listen to all notifications posted for a single object
var token = WKInterfaceObject.Notifications.ObserveDarkerSystemColorsStatusDidChange (objectToObserve, (notification) => {
Console.WriteLine ($"Observed DarkerSystemColorsStatusDidChangeNotification for {nameof (objectToObserve)}!");
};
// Stop listening for notifications
token.Dispose ();