public GoogleSearchViewModel(Window view) { Query = ""; Language = "Auto"; SuggestionAllowed = true; AvailableLanguages = _langCode.GetLanguages(); // Init commands and messenger SetQueryCommand = new RelayCommand( (object q) => { Query = q.ToString(); }, (object q) => { return(!string.IsNullOrEmpty(q.ToString())); } ); DoWorkCommand = AsyncCommand.Create(DoWork); SuggestionCommand = AsyncCommand.Create(FetchSuggestions); Messenger.Base.Register <FetchResultsMsg>(this, OnFetchResultsMsgReceived); // View for search result displaying viewService = new ViewService(view); }