Exemple #1
0
        public static FilterBoxViewModel NewEditor(IValidationScope context, QueryPartSuggestion suggestion)
        {
            var result = new FilterBoxViewModel(context, false, suggestion.Part);

            result.FilterState = result.QueryPart.Validate(context);
            if (result.FilterState == FilterBoxState.HasErrors)
            {
                result.FilterState = FilterBoxState.Editing;
            }
            return(result);
        }
Exemple #2
0
 private void Popup_SuggestionSelected(object sender, QueryPartSuggestion suggestion)
 {
     AddCommand?.Execute(suggestion);
 }