コード例 #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // Remove all items in the dropdown
            Font1Outlet.RemoveAllItems();
            Font2Outlet.RemoveAllItems();
            Font3Outlet.RemoveAllItems();

            // Get all available fonts in the system by family
            var fontFamilies = NSFontManager.SharedFontManager.AvailableFontFamilies.Where(f => AllowedFonts.Contains(f)).ToArray();

            Font1Outlet.AddItems(fontFamilies);
            Font2Outlet.AddItems(fontFamilies);
            Font3Outlet.AddItems(fontFamilies);
        }