Exemplo n.º 1
0
        public App()
        {
            InitializeComponent();

            FontRegistry.RegisterFonts(
                FontAwesomeBrands.Font,
                FontAwesomeRegular.Font,
                FontAwesomeSolid.Font);

            var tabbed  = new TabbedPage();
            var main    = new WebClasses();
            var mainTab = new NavigationPage(main)
            {
                BindingContext = main
            };
            var mappings    = new Mappings();
            var mappingsTab = new NavigationPage(mappings)
            {
                BindingContext = mappings
            };

            mainTab.SetBinding(Page.TitleProperty, "Title");
            mainTab.SetBinding(Page.IconImageSourceProperty, "IconImageSource");
            mappingsTab.SetBinding(Page.TitleProperty, "Title");
            mappingsTab.SetBinding(Page.IconImageSourceProperty, "IconImageSource");
            tabbed.Children.Add(mainTab);
            tabbed.Children.Add(mappingsTab);
            tabbed.Children.Add(new InfoPage());
            MainPage = tabbed;
        }
Exemplo n.º 2
0
        protected override async void OnInitialized()
        {
            InitializeComponent();

            FontRegistry.RegisterFonts(
                FontAwesomeSolid.Font);
            var result = await NavigationService.NavigateAsync("Page2");
        }
Exemplo n.º 3
0
        public App()
        {
            InitializeComponent();

            FontRegistry.RegisterFonts(
                FontAwesomeBrands.Font,
                FontAwesomeRegular.Font,
                FontAwesomeSolid.Font);

            MainPage = new MainPage();
        }
Exemplo n.º 4
0
        protected override async void OnInitialized()
        {
            InitializeComponent();

            FontRegistry.RegisterFonts(FontAwesomeBrands.Font, FontAwesomeRegular.Font, FontAwesomeSolid.Font);

            var result = await NavigationService.NavigateAsync("MainPage/NavigationPage/HomePage");

            if (!result.Success)
            {
                MainPage = result.Exception.ToErrorPage();
                System.Diagnostics.Debugger.Break();
            }
        }
Exemplo n.º 5
0
        public App()
        {
            //ExperimentalFeatures.Enable("SwipeView_Experimental");

            InitializeComponent();

            DbSetup();
            FontRegistry.RegisterFonts(FontAwesomeSolid.Font);

            MainPage = new AppShell();
            Routing.RegisterRoute("calendar/manageDay", typeof(ManageDayPage));
            Routing.RegisterRoute("calendar/manageSubscription", typeof(ManageSubscriptionPage));
            Routing.RegisterRoute("settings/backups", typeof(ManageBackupsPage));
        }
Exemplo n.º 6
0
 public FontImplementation()
 {
     FontRegistry.Clear();
     Xamarin.Forms.Mocks.MockForms.Init();
     FontRegistry.RegisterFonts(
         DevIcons.Font,
         FontAwesomeBrands.Font,
         FontAwesomeRegular.Font,
         FontAwesomeSolid.Font,
         MaterialIcons.Font,
         MaterialIconsOutlined.Font,
         MaterialIconsRound.Font,
         MaterialIconsSharp.Font);
 }
        public void LookupFromRegistry(string selector, string expectedGlyph, string fontAlias)
        {
            lock (lockobject)
            {
                FontRegistry.Clear();
                FontRegistry.RegisterFonts(SampleFontAwesomeRegular.Font, SampleFontAwesomeSolid.Font);

                var font = FontRegistry.LocateFont(selector);

                Assert.NotNull(font);

                Assert.Equal(fontAlias, font.Alias);

                var locatedGlyph = font.GetGlyph(selector);

                Assert.False(string.IsNullOrWhiteSpace(locatedGlyph));
                Assert.Equal(expectedGlyph, locatedGlyph);
            }
        }
 public FontRegistrySetup()
 {
     FontRegistry.Clear();
     Xamarin.Forms.Mocks.MockForms.Init();
     FontRegistry.RegisterFonts(MockFont.Font);
 }
Exemplo n.º 9
0
 public CsharpMarkupTests()
 {
     Xamarin.Forms.Mocks.MockForms.Init();
     FontRegistry.Clear();
     FontRegistry.RegisterFonts(FontAwesomeRegular.Font, FontAwesomeSolid.Font);
 }
Exemplo n.º 10
0
 private void RegisterTestIcons()
 {
     FontRegistry.Clear();
     FontRegistry.RegisterFonts(new EmbeddedMappedFont("TestFontFamily", "test", typeof(MockFontAMapping)));
 }
Exemplo n.º 11
0
 public CsharpMarkupTests(ITestOutputHelper testOutputHelper, FontRegistrySetup setup)
     : base(testOutputHelper, setup)
 {
     FontRegistry.Clear();
     FontRegistry.RegisterFonts(FontAwesomeRegular.Font, FontAwesomeSolid.Font);
 }