public TabPage(MainPage searchPage, MovieListPage topRatedPage, MovieListPage mostPopularPage) { _searchPage = searchPage; _topRatedPage = topRatedPage; _mostPopularPage = mostPopularPage; this.Children.Add(createSearchPage()); this.Children.Add(createTopRatedPage()); this.Children.Add(createMostPopularPage()); }
public App() { InitializeComponent(); _movieService = new MovieService.Services.MovieService(); var searchPage = new MainPage(_movieService); var topRatedPage = new MovieListPage(_movieService, null, "top rated"); var mostPopularPage = new MovieListPage(_movieService, null, "most popular"); var tabPage = new TabPage(searchPage, topRatedPage, mostPopularPage); MainPage = tabPage; }
private async void onSearchButtonClicked(object sender, EventArgs args) { this._indicator.IsRunning = true; this._indicator.IsVisible = true; this._searchButton.IsEnabled = false; this._titleEntry.IsEnabled = false; await _movies.loadMoviesByTitle(_titleEntry.Text); var searchResultPage = new MovieListPage() { BindingContext = this._movies }; this._indicator.IsRunning = false; this._searchButton.IsEnabled = true; this._titleEntry.IsEnabled = true; this._indicator.IsVisible = false; await this.Navigation.PushAsync(searchResultPage); }