/// <summary> /// Constructor. /// </summary> public ApplicationModel(IWriterEnvironment environment) { Environment = environment; _wordSource = new WordVocabularySource(this); SuggestionLists = new ReadOnlyObservableCollection <IReadOnlyList <ITile> >(_nextSuggestions); SuggestionInterstitials = new ReadOnlyObservableCollection <ITile>(_suggestionInterstitials); Source = _wordSource; _wordSource.SetSuggestionsView(); }
internal void SpellingBackspace() { var contextCount = Context.Length; if (contextCount == 1) { _wordVocabularySource.SetSuggestionsView(); } else { var context = Context; Array.Resize(ref context, contextCount - 1); SetContext(context); SetSuggestionsView(); } }