Example #1
0
        public App()
        {
            InitializeComponent();

            MovieDbFactory.RegisterSettings(new MovieDbSettings());
            var movieApi = MovieDbFactory.Create <IApiMovieRequest>().Value;

            this._movieService = new MovieServices(movieApi);

            var moviePage           = new XFMovieSearchPage(this._movieService);
            var movieNavigationPage = new NavigationPage(moviePage);

            movieNavigationPage.Title = "Search";

            this._topRatedPage = new TopRatedPage(this._movieService);
            var topRatedNavigationPage = new NavigationPage(this._topRatedPage);

            topRatedNavigationPage.Title = "Top Rated";

            this._popularMoviesPage = new PopularMoviesPage(this._movieService);
            var popularNavigationPage = new NavigationPage(this._popularMoviesPage);

            popularNavigationPage.Title = "Popular movies";

            this._tabbedPage = new TabPage(this._topRatedPage, this._popularMoviesPage);
            this._tabbedPage.Children.Add(movieNavigationPage);
            this._tabbedPage.Children.Add(topRatedNavigationPage);
            this._tabbedPage.Children.Add(popularNavigationPage);


            MainPage = this._tabbedPage;
        }
Example #2
0
 public TabPage(TopRatedPage topRatedPage, PopularMoviesPage popularMoviesPage)
 {
     this._topRatedPage  = topRatedPage;
     this._popularMovies = popularMoviesPage;
 }