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; }
public TabBarPage() { var searchPage = new MovieListPage(new FilmCollection()); var searchPageNavigator = new NavigationPage(searchPage); searchPageNavigator.Title = "Search"; _topRatedPage = new TopRatedPage(new FilmCollection()); var topReatedNavigator = new NavigationPage(_topRatedPage); topReatedNavigator.Title = "Top Rated"; _popularPage = new PopularPage(new FilmCollection()); var popularNavigator = new NavigationPage(_popularPage); popularNavigator.Title = "Popular"; Children.Add(searchPageNavigator); Children.Add(popularNavigator); Children.Add(topReatedNavigator); }
public TabPage(TopRatedPage topRatedPage, PopularMoviesPage popularMoviesPage) { this._topRatedPage = topRatedPage; this._popularMovies = popularMoviesPage; }