Share via


MPMoviePlayerController.Notifications.ObserveWillEnterFullscreen Method

Definition

Overloads

ObserveWillEnterFullscreen(EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the WillEnterFullscreenNotification constant.

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

Parameters

handler
EventHandler<NSNotificationEventArgs>

The handler that responds to the notification when it occurs.

Returns

Token object that can be used to stop receiving notifications by either disposing it or passing it to RemoveObservers(IEnumerable<NSObject>).

Remarks

This method can be used to subscribe to WillEnterFullscreenNotification notifications.

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

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

Applies to

ObserveWillEnterFullscreen(EventHandler<MPMoviePlayerFullScreenEventArgs>)

Strongly typed notification for the WillEnterFullscreenNotification constant.

public static Foundation.NSObject ObserveWillEnterFullscreen(EventHandler<MediaPlayer.MPMoviePlayerFullScreenEventArgs> handler);
static member ObserveWillEnterFullscreen : EventHandler<MediaPlayer.MPMoviePlayerFullScreenEventArgs> -> Foundation.NSObject

Parameters

handler
EventHandler<MPMoviePlayerFullScreenEventArgs>

The handler that responds to the notification when it occurs.

Returns

Token object that can be used to stop receiving notifications by either disposing it or passing it to RemoveObservers(IEnumerable<NSObject>).

Remarks

This method can be used to subscribe to WillEnterFullscreenNotification notifications.

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

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

Applies to

ObserveWillEnterFullscreen(NSObject, EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the WillEnterFullscreenNotification constant.

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

Parameters

objectToObserve
NSObject

The specific object to observe.

handler
EventHandler<NSNotificationEventArgs>

The handler that responds to the notification when it occurs.

Returns

Token object that can be used to stop receiving notifications by either disposing it or passing it to RemoveObservers(IEnumerable<NSObject>).

Remarks

This method can be used to subscribe to WillEnterFullscreenNotification notifications.

// 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 ();

Applies to

ObserveWillEnterFullscreen(NSObject, EventHandler<MPMoviePlayerFullScreenEventArgs>)

Strongly typed notification for the WillEnterFullscreenNotification constant.

public static Foundation.NSObject ObserveWillEnterFullscreen(Foundation.NSObject objectToObserve, EventHandler<MediaPlayer.MPMoviePlayerFullScreenEventArgs> handler);
static member ObserveWillEnterFullscreen : Foundation.NSObject * EventHandler<MediaPlayer.MPMoviePlayerFullScreenEventArgs> -> Foundation.NSObject

Parameters

objectToObserve
NSObject

The specific object to observe.

handler
EventHandler<MPMoviePlayerFullScreenEventArgs>

The handler that responds to the notification when it occurs.

Returns

Token object that can be used to stop receiving notifications by either disposing it or passing it to RemoveObservers(IEnumerable<NSObject>).

Remarks

This method can be used to subscribe to WillEnterFullscreenNotification notifications.

// 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 ();

Applies to