예제 #1
0
        Page PreparePage(WelcomeSectionId id)
        {
            var page = GetPage(id);

            page.Title = id.GetTitle();
            return(page);
        }
        Page GetPage(WelcomeSectionId id)
        {
            var page = id switch
            {
                WelcomeSectionId.Behaviors => new BehaviorsPage(),
                WelcomeSectionId.Converters => new ContentPage(),
                WelcomeSectionId.Views => new ContentPage(),
                WelcomeSectionId.TestCases => new ContentPage(),
                _ => throw new System.NotImplementedException()
            };

            page.Title = id.GetTitle();
            return(page);
        }
    }
예제 #3
0
        Page GetPage(WelcomeSectionId id)
        {
            var page = id switch
            {
                WelcomeSectionId.Behaviors => new BehaviorsPage(),
                WelcomeSectionId.Converters => new ContentPage(),
                WelcomeSectionId.Views => new ViewsGalleryPage(),
                WelcomeSectionId.Extensions => new ContentPage(),
                WelcomeSectionId.TestCases => new ContentPage(),
                _ => throw new System.NotImplementedException()
            };

            page.Title = id.GetTitle();
            return(page);
        }

        async void OnAboutClicked(Object sender, EventArgs e) => await Navigation.PushAsync(new AboutPage());
    }
 public WelcomeSectionModel(WelcomeSectionId id)
 {
     Id    = id;
     Title = id.GetTitle();
 }
 public static string GetTitle(this WelcomeSectionId id)
 => id switch
 {
예제 #6
0
 Page GetPage(WelcomeSectionId id)
 => id switch
 {