Share via


NSTableView.Notifications.ObserveColumnDidResize Method

Definition

Overloads

ObserveColumnDidResize(EventHandler<NSViewColumnResizeEventArgs>)

Strongly typed notification for the ColumnDidResizeNotification constant.

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

Parameters

handler
EventHandler<NSViewColumnResizeEventArgs>

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

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

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

Applies to

ObserveColumnDidResize(NSObject, EventHandler<NSViewColumnResizeEventArgs>)

Strongly typed notification for the ColumnDidResizeNotification constant.

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

Parameters

objectToObserve
NSObject

The specific object to observe.

handler
EventHandler<NSViewColumnResizeEventArgs>

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

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

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

Applies to