protected virtual NSImage GetTabViewItemIconImageSource(NSImage image) { if (image == null) { return(null); } bool shouldResize = TabStyle == NSTabViewControllerTabStyle.SegmentedControlOnTop || TabStyle == NSTabViewControllerTabStyle.SegmentedControlOnBottom; if (shouldResize) { image = image.ResizeTo(new CGSize(DefaultImageSizeSegmentedButton, DefaultImageSizeSegmentedButton)); } return(image); }