void OnCustomGetFullTextSearchProperties(object sender, CustomGetFullTextSearchPropertiesEventArgs customGetFullTextSearchPropertiesEventArgs) {
     var xpandSearchCriteriaBuilder = new XpandSearchCriteriaBuilder(View.ObjectTypeInfo, View);
     var fullTextSearchProperties = GetFullTextSearchProperties(xpandSearchCriteriaBuilder);
     customGetFullTextSearchPropertiesEventArgs.Properties.Clear();
     customGetFullTextSearchPropertiesEventArgs.Properties.AddRange(fullTextSearchProperties);
     customGetFullTextSearchPropertiesEventArgs.Handled = true;
 }
 void OnCustomGetFullTextSearchProperties(object sender, CustomGetFullTextSearchPropertiesEventArgs customGetFullTextSearchPropertiesEventArgs) {
     ListView listView = ((FilterController) sender).View;
     var xpandSearchCriteriaBuilder = new XpandSearchCriteriaBuilder(listView.ObjectTypeInfo, listView);
     var fullTextSearchProperties = GetFullTextSearchProperties(xpandSearchCriteriaBuilder,listView);
     customGetFullTextSearchPropertiesEventArgs.Properties.Clear();
     customGetFullTextSearchPropertiesEventArgs.Properties.AddRange(fullTextSearchProperties);
     customGetFullTextSearchPropertiesEventArgs.Handled = true;
 }
        protected virtual ICollection<String> GetFullTextSearchProperties(XpandSearchCriteriaBuilder criteriaBuilder) {

            criteriaBuilder.IncludeNonPersistentMembers = false;
            FullTextSearchTargetPropertiesMode fullTextSearchTargetPropertiesMode = GetFullTextSearchTargetPropertiesMode();
            switch (fullTextSearchTargetPropertiesMode) {
                case FullTextSearchTargetPropertiesMode.AllSearchableMembers:
                    criteriaBuilder.FillSearchProperties();
                    criteriaBuilder.AddSearchProperties(GetShownProperties(criteriaBuilder));
                    break;
                case FullTextSearchTargetPropertiesMode.VisibleColumns:
                    var shownProperties = new List<string>(GetShownProperties(criteriaBuilder));
                    string friendlyKeyMemberName = FriendlyKeyPropertyAttribute.FindFriendlyKeyMemberName(View.ObjectTypeInfo, true);
                    if (!string.IsNullOrEmpty(friendlyKeyMemberName) && !shownProperties.Contains(friendlyKeyMemberName)) {
                        shownProperties.Add(friendlyKeyMemberName);
                    }
                    criteriaBuilder.SetSearchProperties(shownProperties);
                    break;
                case FullTextSearchTargetPropertiesMode.IncludedColumns: {
                    var properties = criteriaBuilder.IncludedColumns.Select(pair => pair.Value.Name).ToArray();
                    criteriaBuilder.SetSearchProperties(properties);
                    break;
                }
                default:
                    throw new ArgumentException(fullTextSearchTargetPropertiesMode.ToString(), "criteriaBuilder");
            }
            return criteriaBuilder.SearchProperties;
        }
 private string[] GetShownProperties(XpandSearchCriteriaBuilder criteriaBuilder) {
     var visibleProperties = new List<string>();
     var modelColumns = ((ListView)View).Model.Columns.GetVisibleColumns().Where(column => !criteriaBuilder.ExcludedColumns.Select(pair => pair.Key).Contains(column));
     foreach (IModelColumn column in modelColumns) {
         IMemberInfo memberInfo = null;
         if (column.ModelMember != null) {
             memberInfo = new ObjectEditorHelperBase(column.ModelMember.MemberInfo.MemberTypeInfo, column).DisplayMember;
         }
         if (memberInfo != null) {
             visibleProperties.Add(column.PropertyName + "." + memberInfo.Name);
         } else {
             visibleProperties.Add(column.PropertyName);
         }
     }
     return visibleProperties.ToArray();
 }