Ejemplo n.º 1
0
 public static LayoutOrientation ToOrientation(this NSUserInterfaceLayoutOrientation orientation)
 {
     if (orientation == NSUserInterfaceLayoutOrientation.Horizontal)
     {
         return(LayoutOrientation.Horizontal);
     }
     return(LayoutOrientation.Vertical);
 }
Ejemplo n.º 2
0
 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;
     }
 }