Ejemplo n.º 1
0
        void ReleaseDesignerOutlets()
        {
            if (Font1Outlet != null)
            {
                Font1Outlet.Dispose();
                Font1Outlet = null;
            }

            if (Font2Outlet != null)
            {
                Font2Outlet.Dispose();
                Font2Outlet = null;
            }

            if (Font3Outlet != null)
            {
                Font3Outlet.Dispose();
                Font3Outlet = null;
            }

            if (FileDirectoryField != null)
            {
                FileDirectoryField.Dispose();
                FileDirectoryField = null;
            }
        }
Ejemplo n.º 2
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);
        }