net472_PropertyGridHelpers.UIEditors_AutoCompleteComboBoxEditor - dparvin/PropertyGridHelpers GitHub Wiki

AutoCompleteComboBoxEditor class

Provides a UITypeEditor that displays an AutoCompleteComboBox in a drop-down editor within the PropertyGrid.

public class AutoCompleteComboBoxEditor : DropDownVisualizer<AutoCompleteComboBox>

Public Members

name description
AutoCompleteComboBoxEditor() The default constructor.
Converter { get; set; } Gets or sets the converter.
override EditValue(…) Displays the editor control in a dropdown and returns the updated value after editing completes.

Remarks

This editor supports auto-complete behavior based on a configurable AutoCompleteSource and AutoCompleteMode as defined by the AutoCompleteSetupAttribute. For CustomSource, the list of suggestions can be provided:

  • Directly via string array
  • From an enum's names
  • From a public static string[] Values property on a class

Examples

Apply this editor to a string property like this:

[AutoCompleteSetup(AutoCompleteSource.FileSystem)]
[Editor(typeof(AutoCompleteComboBoxEditor), typeof(UITypeEditor))]
public string FilePath { get; set; }

[AutoCompleteSetup(typeof(ConsoleColor))]
[Editor(typeof(AutoCompleteComboBoxEditor), typeof(UITypeEditor))]
public string FavoriteColor { get; set; }

[AutoCompleteSetup("Red", "Green", "Blue")]
[Editor(typeof(AutoCompleteComboBoxEditor), typeof(UITypeEditor))]
public string CustomColor { get; set; }

See Also

⚠️ **GitHub.com Fallback** ⚠️