void SetSuggestions() { if (!IsDropDownOpen) { return; } Suggestions.Clear(); var find = SelectedText == Text ? "" : SelectedText.CoalesceNullOrEmpty(Text) ?? ""; var ucFind = Regex.Replace(find, "[^A-Z]", ""); foreach (var suggestion in SuggestionList.Where(x => HasStr(x.Text, find))) { Suggestions.Add(suggestion); } if (!Suggestions.Any()) { Suggestions.Add(null); } SuggestedIndex = find == "" ? 0 : Suggestions.Indexes(str => str?.Text.StartsWith(Text, StringComparison.InvariantCultureIgnoreCase) ?? false).FirstOrDefault(); }