Пример #1
0
        private void OnSelectionChanged(object sender, RoutedEventArgs e)
        {
            var text = Text.ToString();

            if (BubbleTextBox.SearchByUsername(text.Substring(0, Math.Min(SelectionStart, text.Length)), out string username, out int index))
            {
                //View.Autocomplete = GetUsernames(username);
            }
Пример #2
0
        private void OnSelectionChanged(object sender, RoutedEventArgs e)
        {
            var text = Text.ToString();

            if (BubbleTextBox.SearchByUsername(text.Substring(0, Math.Min(SelectionStart, text.Length)), out string username))
            {
                View.Autocomplete = GetUsernames(username);
            }
            else if (BubbleTextBox.SearchByEmoji(text.Substring(0, Math.Min(SelectionStart, text.Length)), out string replacement) && replacement.Length > 0 && ApplicationSettings.Current.IsReplaceEmojiEnabled)
            {
                View.Autocomplete = EmojiSuggestion.GetSuggestions(replacement);
            }
            else
            {
                View.Autocomplete = null;
            }
        }