Beispiel #1
0
        static public bool IsAccessibilityCategory(this UIContentSizeCategory self)
        {
            var c1 = self.GetConstant();

            if (c1 == null)
            {
                throw new ArgumentException($"Unknown 'UIContentSizeCategory' value");
            }

            return(UIContentSizeCategoryIsAccessibilityCategory(c1.Handle));
        }
Beispiel #2
0
        public static NSComparisonResult Compare(UIContentSizeCategory category1, UIContentSizeCategory category2)
        {
            var c1 = category1.GetConstant();

            if (c1 == null)
            {
                throw new ArgumentException($"Unknown 'UIContentSizeCategory' value", nameof(category1));
            }

            var c2 = category2.GetConstant();

            if (c2 == null)
            {
                throw new ArgumentException($"Unknown 'UIContentSizeCategory' value", nameof(category2));
            }

            return((NSComparisonResult)(long)UIContentSizeCategoryCompareToCategory(c1.Handle, c2.Handle));
        }
 public UITraitCollection FromPreferredContentSizeCategory(UIContentSizeCategory category)
 {
     return(FromPreferredContentSizeCategory(category.GetConstant()));
 }
 public static UITraitCollection Create(UIContentSizeCategory category)
 => FromPreferredContentSizeCategory(category.GetConstant());