Exemplo n.º 1
0
        /// <summary>
        /// Actual constructor
        /// </summary>
        /// <param name="page"></param>
        public HomeViewModel(HomePage page)
        {
            _isResultAvailable = false;
            // Get the page
            _page = page;

            _service = new WikipediaApiDataService();

            _searchResult = new SearchResult();

            _goToSource = new Command(url => Launcher.OpenAsync(new Uri(url.ToString())));

            // Command to search an item that we tapped
            _searchTappedItem = new Command(async title => await GenerateSearchResult(title.ToString()));

            // Set scroll command
            //_resultScroll = new Command();

            // Default values
            //
            // Set the title
            Title = "Home";
            // Set the subtitle
            _subtitle         = subtitleDefault;
            _isLoading        = false;
            _isResultSomebody = false;
        }
 public void Setup()
 {
     _service = new WikipediaApiDataService();
 }