Click here to Skip to main content
13,049,814 members (80,961 online)
Click here to Skip to main content

Stats

182.4K views
14.7K downloads
91 bookmarked
Posted 31 May 2008

WPF Autocomplete Textbox Control

, 31 May 2008
An article showing how to build a WPF autocomplete textbox control with delay input
Release
WPFAutoCompleteTextbox.exe
WPFAutoCompleteTextbox.pdb
WPFAutoCompleteTextbox.vshost.exe
WPFAutoCompleteTextbox.vshost.exe.manifest
WPFAutoCompleteTextbox
WPFAutoCompleteTextbox
bin
Release
WPFAutoCompleteTextbox.vshost.exe
WPFAutoCompleteTextbox.vshost.exe.manifest
Properties
WPFAutoCompleteTextbox.csproj.user
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WPFAutoCompleteTextbox
{
    public class AutoCompleteEntry
    {
        private string[] keywordStrings;
        private string displayString;

        public string[] KeywordStrings
        {
            get
            {
                if (keywordStrings == null)
                {
                    keywordStrings = new string[] { displayString };
                }
                return keywordStrings;
            }
        }

        public string DisplayName
        {
            get { return displayString; }
            set { displayString = value; }
        }

        public AutoCompleteEntry(string name, params string[] keywords)
        {
            displayString = name;
            keywordStrings = keywords;
        }

        public override string ToString()
        {
            return displayString;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

thomastn
United States United States
No Biography provided

You may also be interested in...

Pro
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 31 May 2008
Article Copyright 2008 by thomastn
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid