Last active
January 16, 2020 21:10
-
-
Save mshenoy83/f90e13380f601a367c73eaa5cfc23bc7 to your computer and use it in GitHub Desktop.
Get FontNames in Xamarin iOS source : https://dev.to/codingcoach/using-font-awesome-in-xamarinforms--3mh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The UIApplicationDelegate for the application. This class is responsible for launching the | |
// User Interface of the application, as well as listening (and optionally responding) to | |
// application events from iOS. | |
[Register("AppDelegate")] | |
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate | |
{ | |
// | |
// This method is invoked when the application has loaded and is ready to run. In this | |
// method you should instantiate the window, load the UI into it and then make the window | |
// visible. | |
// | |
// You have 17 seconds to return from this method, or iOS will terminate your application. | |
// | |
public override bool FinishedLaunching(UIApplication app, NSDictionary options) | |
{ | |
global::Xamarin.Forms.Forms.Init(); | |
global::Xamarin.Forms.FormsMaterial.Init(); | |
foreach(var familyNames in UIFont.FamilyNames.Where(f=>f.StartsWith("Roboto")).OrderBy(x=>x).ToList()) | |
{ | |
Console.WriteLine("*" + familyNames); | |
foreach(var familyName in UIFont.FontNamesForFamilyName(familyNames).OrderBy(c=>c).ToList()) | |
{ | |
Console.WriteLine("*" + familyName); | |
} | |
} | |
LoadApplication(new App()); | |
return base.FinishedLaunching(app, options); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment