Пример #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;
        }
Пример #2
0
        protected override async void OnInitialized()
        {
            InitializeComponent();

            FontRegistry.RegisterFonts(
                FontAwesomeSolid.Font);
            var result = await NavigationService.NavigateAsync("Page2");
        }
Пример #3
0
        public App()
        {
            InitializeComponent();

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

            MainPage = new MainPage();
        }
Пример #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();
            }
        }
Пример #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));
        }
Пример #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);
 }
Пример #9
0
 public CsharpMarkupTests()
 {
     Xamarin.Forms.Mocks.MockForms.Init();
     FontRegistry.Clear();
     FontRegistry.RegisterFonts(FontAwesomeRegular.Font, FontAwesomeSolid.Font);
 }
Пример #10
0
 private void RegisterTestIcons()
 {
     FontRegistry.Clear();
     FontRegistry.RegisterFonts(new EmbeddedMappedFont("TestFontFamily", "test", typeof(MockFontAMapping)));
 }
Пример #11
0
 public CsharpMarkupTests(ITestOutputHelper testOutputHelper, FontRegistrySetup setup)
     : base(testOutputHelper, setup)
 {
     FontRegistry.Clear();
     FontRegistry.RegisterFonts(FontAwesomeRegular.Font, FontAwesomeSolid.Font);
 }