Skip to main content
All docs

TextEditAdvancedModeOptions.AutoCompleteSource Property

Gets or sets the source of auto-complete suggestions. This property is in effect if the RepositoryItemTextEdit.UseAdvancedMode option is enabled.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v22.2.dll

NuGet Package: DevExpress.Win.Navigation


public AutoCompleteSource AutoCompleteSource { get; set; }

Property Value

Type Default Description
AutoCompleteSource None

The auto-complete source type.

Property Paths

You can access this nested property as listed below:

Object Type Path to AutoCompleteSource
.AdvancedModeOptions .AutoCompleteSource


Use the TextEditAdvancedModeOptions.AutoCompleteMode property to enable text auto-completion. The AutoCompleteSource property allows you to specify the source of auto-complete suggestions. You can set this property to the following System.Windows.Forms.AutoCompleteSource enumeration values:

  • CustomSource — Custom auto-complete suggestions. Use the RepositoryItemTextEdit.CustomizeAutoCompleteSource event, or the AutoCompleteCustomSource property to specify the source of these suggestions.
  • FileSystem — A list of the folder and file names in the file system.
  • HistoryList — A list of URLs in the history list.
  • RecentlyUserList — A list of most recently used URLs.
  • AllUrl — A combination of the HistoryList and RecentlyUsedList options.
  • AllSystemSources — A combination of the FileSystem and AllUrl options.
  • FileSystemDirectories — A list of folder names in the file system.
  • ListItems — Not supported.
  • None — The auto-complete feature is disabled.


The example below uses the TextEditAdvancedModeOptions.AutoCompleteCustomSource property to supply custom auto-complete suggestions for a text editor.

AutoCompleteCustomSource - example

  private void Form1_Load(object sender, EventArgs e) {
    // Define a custom string collection.
    var DaysOfTheWeek = new AutoCompleteStringCollection();
    DaysOfTheWeek.AddRange(new string[]
      {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"});

    // Activate advanced mode.
    textEdit1.Properties.UseAdvancedMode = DevExpress.Utils.DefaultBoolean.True;
    textEdit1.Properties.AdvancedModeOptions.AutoCompleteMode = DevExpress.XtraEditors.TextEditAutoCompleteMode.SuggestAppend;
    // Enable custom auto-complete suggestions.
    textEdit1.Properties.AdvancedModeOptions.AutoCompleteSource = AutoCompleteSource.CustomSource;
    // Supply the custom auto-complete suggestions.
    textEdit1.Properties.AdvancedModeOptions.AutoCompleteCustomSource = DaysOfTheWeek;
See Also