WKInterfaceObject.Notifications.ObserveAssistiveTechnologyKey Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Sobrecargas
| ObserveAssistiveTechnologyKey(EventHandler<NSNotificationEventArgs>) |
Notificación fuertemente tipada para la constante P:WatchKit.WKInterfaceObject.AssistiveTechnologyKeyNotification . |
| ObserveAssistiveTechnologyKey(NSObject, EventHandler<NSNotificationEventArgs>) |
Notificación fuertemente tipada para la constante P:WatchKit.WKInterfaceObject.AssistiveTechnologyKeyNotification . |
ObserveAssistiveTechnologyKey(EventHandler<NSNotificationEventArgs>)
Notificación fuertemente tipada para la constante P:WatchKit.WKInterfaceObject.AssistiveTechnologyKeyNotification .
public static Foundation.NSObject ObserveAssistiveTechnologyKey(EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveAssistiveTechnologyKey : EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
Parámetros
- handler
- EventHandler<NSNotificationEventArgs>
Método para invocar cuando se publica la notificación.
Devoluciones
Objeto de token que se puede usar para dejar de recibir notificaciones al eliminarlo o pasarlo a RemoveObservers(IEnumerable<NSObject>)
Comentarios
Este método se puede usar para suscribirse a las notificaciones P:WatchKit.WKInterfaceObject.AssistiveTechnologyKeyNotification .
// Listen to all notifications posted for any object
var token = WKInterfaceObject.Notifications.ObserveAssistiveTechnologyKey ((notification) => {
Console.WriteLine ("Observed AssistiveTechnologyKeyNotification!");
};
// Listen to all notifications posted for a single object
var token = WKInterfaceObject.Notifications.ObserveAssistiveTechnologyKey (objectToObserve, (notification) => {
Console.WriteLine ($"Observed AssistiveTechnologyKeyNotification for {nameof (objectToObserve)}!");
};
// Stop listening for notifications
token.Dispose ();
Se aplica a
ObserveAssistiveTechnologyKey(NSObject, EventHandler<NSNotificationEventArgs>)
Notificación fuertemente tipada para la constante P:WatchKit.WKInterfaceObject.AssistiveTechnologyKeyNotification .
public static Foundation.NSObject ObserveAssistiveTechnologyKey(Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveAssistiveTechnologyKey : Foundation.NSObject * EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
Parámetros
- objectToObserve
- NSObject
Objeto que se va a observar.
- handler
- EventHandler<NSNotificationEventArgs>
Método para invocar cuando se publica la notificación.
Devoluciones
Objeto de token que se puede usar para dejar de recibir notificaciones al eliminarlo o pasarlo a RemoveObservers(IEnumerable<NSObject>)
Comentarios
Este método se puede usar para suscribirse a las notificaciones P:WatchKit.WKInterfaceObject.AssistiveTechnologyKeyNotification .
// Listen to all notifications posted for any object
var token = WKInterfaceObject.Notifications.ObserveAssistiveTechnologyKey ((notification) => {
Console.WriteLine ("Observed AssistiveTechnologyKeyNotification!");
};
// Listen to all notifications posted for a single object
var token = WKInterfaceObject.Notifications.ObserveAssistiveTechnologyKey (objectToObserve, (notification) => {
Console.WriteLine ($"Observed AssistiveTechnologyKeyNotification for {nameof (objectToObserve)}!");
};
// Stop listening for notifications
token.Dispose ();