MPMoviePlayerController.Notifications.ObserveWillEnterFullscreen Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
ObserveWillEnterFullscreen(EventHandler<NSNotificationEventArgs>) |
Notifica fortemente tipizzata per la WillEnterFullscreenNotification costante. |
ObserveWillEnterFullscreen(EventHandler<MPMoviePlayerFullScreenEventArgs>) |
Notifica fortemente tipizzata per la WillEnterFullscreenNotification costante. |
ObserveWillEnterFullscreen(NSObject, EventHandler<NSNotificationEventArgs>) |
Notifica fortemente tipizzata per la WillEnterFullscreenNotification costante. |
ObserveWillEnterFullscreen(NSObject, EventHandler<MPMoviePlayerFullScreenEventArgs>) |
Notifica fortemente tipizzata per la WillEnterFullscreenNotification costante. |
ObserveWillEnterFullscreen(EventHandler<NSNotificationEventArgs>)
Notifica fortemente tipizzata per la WillEnterFullscreenNotification costante.
public static Foundation.NSObject ObserveWillEnterFullscreen (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveWillEnterFullscreen : EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
Parametri
- handler
- EventHandler<NSNotificationEventArgs>
Metodo da richiamare quando viene inviata la notifica.
Restituisce
Oggetto token che può essere usato per interrompere la ricezione delle notifiche eliminandolo o passandolo a RemoveObservers(IEnumerable<NSObject>)
Commenti
L'esempio seguente illustra come gli sviluppatori possono usare questo metodo nel codice:
//
// Lambda style
//
// listening
notification = MPMoviePlayerController.Notifications.ObserveWillEnterFullscreen ((sender, args) => {
/* Access strongly typed args */
Console.WriteLine ("Notification: {0}", args.Notification);
Console.WriteLine ("AnimationDuration", args.AnimationDuration);
Console.WriteLine ("AnimationCurve", args.AnimationCurve);
});
// To stop listening:
notification.Dispose ();
//
//Method style
//
NSObject notification;
void Callback (object sender, Foundation.NSNotificationEventArgs args)
{
// Access strongly typed args
Console.WriteLine ("Notification: {0}", args.Notification);
Console.WriteLine ("AnimationDuration", args.AnimationDuration);
Console.WriteLine ("AnimationCurve", args.AnimationCurve);
}
void Setup ()
{
notification = MPMoviePlayerController.Notifications.ObserveWillEnterFullscreen (Callback);
}
void Teardown ()
{
notification.Dispose ();
}
Si applica a
ObserveWillEnterFullscreen(EventHandler<MPMoviePlayerFullScreenEventArgs>)
Notifica fortemente tipizzata per la WillEnterFullscreenNotification costante.
public static Foundation.NSObject ObserveWillEnterFullscreen (EventHandler<MediaPlayer.MPMoviePlayerFullScreenEventArgs> handler);
static member ObserveWillEnterFullscreen : EventHandler<MediaPlayer.MPMoviePlayerFullScreenEventArgs> -> Foundation.NSObject
Parametri
Metodo da richiamare quando viene inviata la notifica.
Restituisce
Oggetto token che può essere usato per interrompere la ricezione delle notifiche eliminandolo o passandolo a RemoveObservers(IEnumerable<NSObject>)
Commenti
Questo metodo può essere usato per sottoscrivere WillEnterFullscreenNotification le notifiche.
// Listen to all notifications posted for any object
var token = MPMoviePlayerController.Notifications.ObserveWillEnterFullscreen ((notification) => {
Console.WriteLine ("Observed WillEnterFullscreenNotification!");
};
// Listen to all notifications posted for a single object
var token = MPMoviePlayerController.Notifications.ObserveWillEnterFullscreen (objectToObserve, (notification) => {
Console.WriteLine ($"Observed WillEnterFullscreenNotification for {nameof (objectToObserve)}!");
};
// Stop listening for notifications
token.Dispose ();
Si applica a
ObserveWillEnterFullscreen(NSObject, EventHandler<NSNotificationEventArgs>)
Notifica fortemente tipizzata per la WillEnterFullscreenNotification costante.
public static Foundation.NSObject ObserveWillEnterFullscreen (Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveWillEnterFullscreen : Foundation.NSObject * EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
Parametri
- objectToObserve
- NSObject
Oggetto da osservare.
- handler
- EventHandler<NSNotificationEventArgs>
Metodo da richiamare quando viene inviata la notifica.
Restituisce
Oggetto token che può essere usato per interrompere la ricezione delle notifiche eliminandolo o passandolo a RemoveObservers(IEnumerable<NSObject>)
Commenti
Questo metodo può essere usato per sottoscrivere WillEnterFullscreenNotification le notifiche.
// Listen to all notifications posted for any object
var token = MPMoviePlayerController.Notifications.ObserveWillEnterFullscreen ((notification) => {
Console.WriteLine ("Observed WillEnterFullscreenNotification!");
};
// Listen to all notifications posted for a single object
var token = MPMoviePlayerController.Notifications.ObserveWillEnterFullscreen (objectToObserve, (notification) => {
Console.WriteLine ($"Observed WillEnterFullscreenNotification for {nameof (objectToObserve)}!");
};
// Stop listening for notifications
token.Dispose ();
Si applica a
ObserveWillEnterFullscreen(NSObject, EventHandler<MPMoviePlayerFullScreenEventArgs>)
Notifica fortemente tipizzata per la WillEnterFullscreenNotification costante.
public static Foundation.NSObject ObserveWillEnterFullscreen (Foundation.NSObject objectToObserve, EventHandler<MediaPlayer.MPMoviePlayerFullScreenEventArgs> handler);
static member ObserveWillEnterFullscreen : Foundation.NSObject * EventHandler<MediaPlayer.MPMoviePlayerFullScreenEventArgs> -> Foundation.NSObject
Parametri
- objectToObserve
- NSObject
Oggetto da osservare.
Metodo da richiamare quando viene inviata la notifica.
Restituisce
Oggetto token che può essere usato per interrompere la ricezione delle notifiche eliminandolo o passandolo a RemoveObservers(IEnumerable<NSObject>)
Commenti
Questo metodo può essere usato per sottoscrivere WillEnterFullscreenNotification le notifiche.
// Listen to all notifications posted for any object
var token = MPMoviePlayerController.Notifications.ObserveWillEnterFullscreen ((notification) => {
Console.WriteLine ("Observed WillEnterFullscreenNotification!");
};
// Listen to all notifications posted for a single object
var token = MPMoviePlayerController.Notifications.ObserveWillEnterFullscreen (objectToObserve, (notification) => {
Console.WriteLine ($"Observed WillEnterFullscreenNotification for {nameof (objectToObserve)}!");
};
// Stop listening for notifications
token.Dispose ();