public static NSSegmentedControl FromImages(NSImage[] images, NSSegmentSwitchTracking trackingMode, Action action) { var dispatcher = new NSActionDispatcher(action); var control = _FromImages(images, trackingMode, dispatcher, NSActionDispatcher.Selector); control.dispatcher = dispatcher; return(control); }
public static NSSegmentedControl FromLabels(string[] labels, NSSegmentSwitchTracking trackingMode, Action action) { var dispatcher = new NSActionDispatcher(action); var control = _FromLabels(labels, trackingMode, dispatcher, NSActionDispatcher.Selector); control.dispatcher = dispatcher; return(control); }
public void UnselectAllSegments() { NSSegmentSwitchTracking current = this.Cell.TrackingMode; this.Cell.TrackingMode = NSSegmentSwitchTracking.Momentary; for (nint i = 0; i < this.SegmentCount; i++) { SetSelected(false, i); } this.Cell.TrackingMode = current; }