public async Task GetSearchResults(string query, MoviesListVewModel moviesListVewModel) { _moviesList = moviesListVewModel; query = query.Replace(' ', '+').ToLower(); try { using (WebClient client = new WebClient()) { var uri = new Uri(string.Format(url, query)); client.DownloadStringCompleted += OnDownloadCompleted; client.DownloadStringAsync(uri); } } catch (Exception e) { Console.WriteLine(e); throw; } }
public MoviesListPage() { InitializeComponent(); BindingContext = _viewModel = new MoviesListVewModel(); }