コード例 #1
0
 void OnTopSuggestionChanged(object sender, SuggestionsEventArgs e)
 {
     if (_lastClicked == this && ShowHints)
     {
         var settings    = AppSettings.Instance;
         var suggestions = settings.Prediction.KeyTopHints;
         PrimarySuggestion.Text = 1 <= suggestions && 1 <= e.Suggestions.Count ? e.Suggestions[0] : string.Empty;
     }
 }
コード例 #2
0
        /// <summary>
        /// Set the new top suggestions.
        /// </summary>
        /// <param name="suggestions"></param>
        public static void SetSuggestions(IList <string> suggestions)
        {
            var handler = SuggestionsChanged;

            if (handler != null)
            {
                var e = new SuggestionsEventArgs(suggestions);
                handler(null, e);
            }
        }