Share via


NSSplitView.Notifications.ObserveNSSplitViewWillResizeSubviews Method

Definition

Overloads

ObserveNSSplitViewWillResizeSubviews(EventHandler<NSSplitViewDividerIndexEventArgs>)

Strongly typed notification for the NSSplitViewWillResizeSubviewsNotification constant.

public static Foundation.NSObject ObserveNSSplitViewWillResizeSubviews(EventHandler<AppKit.NSSplitViewDividerIndexEventArgs> handler);
static member ObserveNSSplitViewWillResizeSubviews : EventHandler<AppKit.NSSplitViewDividerIndexEventArgs> -> Foundation.NSObject

Parameters

handler
EventHandler<NSSplitViewDividerIndexEventArgs>

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 NSSplitViewWillResizeSubviewsNotification notifications.

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

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

Applies to

ObserveNSSplitViewWillResizeSubviews(NSObject, EventHandler<NSSplitViewDividerIndexEventArgs>)

Strongly typed notification for the NSSplitViewWillResizeSubviewsNotification constant.

public static Foundation.NSObject ObserveNSSplitViewWillResizeSubviews(Foundation.NSObject objectToObserve, EventHandler<AppKit.NSSplitViewDividerIndexEventArgs> handler);
static member ObserveNSSplitViewWillResizeSubviews : Foundation.NSObject * EventHandler<AppKit.NSSplitViewDividerIndexEventArgs> -> Foundation.NSObject

Parameters

objectToObserve
NSObject

The specific object to observe.

handler
EventHandler<NSSplitViewDividerIndexEventArgs>

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 NSSplitViewWillResizeSubviewsNotification notifications.

// Listen to all notifications posted for a single object
var token = NSSplitView.Notifications.ObserveNSSplitViewWillResizeSubviews (objectToObserve, (notification) => {
  Console.WriteLine ($"Observed NSSplitViewWillResizeSubviewsNotification for {nameof (objectToObserve)}!");
};

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

Applies to