public static LayoutOrientation ToOrientation(this NSUserInterfaceLayoutOrientation orientation) { if (orientation == NSUserInterfaceLayoutOrientation.Horizontal) { return(LayoutOrientation.Horizontal); } return(LayoutOrientation.Vertical); }
public NSLine(NSUserInterfaceLayoutOrientation orientation, int lineWidth = 1) { BoxType = NSBoxType.NSBoxSeparator; if (orientation == NSUserInterfaceLayoutOrientation.Horizontal) { HeightAnchor.ConstraintEqualToConstant(lineWidth).Active = true; } else if (orientation == NSUserInterfaceLayoutOrientation.Vertical) { WidthAnchor.ConstraintEqualToConstant(lineWidth).Active = true; } }