net472_PropertyGridHelpers.UIEditors_AutoCompleteComboBoxEditor - dparvin/PropertyGridHelpers GitHub Wiki
Provides a UITypeEditor that displays an AutoCompleteComboBox
in a drop-down editor within the PropertyGrid.
public class AutoCompleteComboBoxEditor : DropDownVisualizer<AutoCompleteComboBox>
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. |
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
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; }
- class DropDownVisualizer<TControl>
- class AutoCompleteComboBox
- class AutoCompleteSetupAttribute
- namespace PropertyGridHelpers.UIEditors
- assembly PropertyGridHelpers
- AutoCompleteComboBoxEditor.cs