Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7555083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:30:36+00:00 2026-05-30T11:30:36+00:00

Just installed SL5 and the toolkit, that were released few days ago. The bug

  • 0

Just installed SL5 and the toolkit, that were released few days ago.
The bug happens when you set the Text property of the AutoCompleteBox to string.Empty. It causes the AutoCompleteBox to be in a buggy state. To reproduce the bug:

add an AutoCompleteBox and a Button to the main page. Register to the TextChanged and Click events. This is the code-behind:

public partial class MainPage : UserControl
{
    public MainPage()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, RoutedEventArgs e)
    {
        auto.Text = string.Empty;
    }

    private void auto_TextChanged(object sender, RoutedEventArgs e)
    {
        // Put a break point here.
    }
} 

In runtime:

1) type “aa” into the autobox.

2) click the button.

3) type “q”. ( TextChanged is still invoked).

4) erase the “q” – TextChanged is not invoked.

5) type “q” again – TextChanged is not invoked.

6) and so on, until you pick a new letter. And then it’s starts over.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:30:38+00:00Added an answer on May 30, 2026 at 11:30 am

    I found a workaround for this strange behavior. You need a control derived from AutoCompleteBox and overrride OnApplyTemplate method to find inner TextBox of AutoCompleteBox.

    When inner TextBox TextChanged event fires you need to fire TextChanged event of AutoCompleteBox control manually.

    public class CustomAutoComplete : AutoCompleteBox
    {
        TextBox mytext;
    
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
            mytext = GetTemplateChild("Text") as TextBox;
            mytext.TextChanged += new System.Windows.Controls.TextChangedEventHandler(mytext_TextChanged);
        }
    
        void mytext_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e)
        {
            this.Text = mytext.Text;
            OnTextChanged(new RoutedEventArgs());
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just installed Fedora 14 and I see that it includes Eclipse 3.6. It
Just installed git on Windows. I set the GIT_DIR variable to be c:\git\ and
Just installed Xcode 4 so far so good, except that Apple changed all the
I just installed Visual Studio 2012 and noticed that the version as mentioned in
Just installed a clean version of mongodb on Fedora 17 64-bit, but the Mongo
Just installed Python 2.7.3 on a Windows7 machine. How do I get .py files
Just installed Jenkins in Ubuntu 12.04 and I wanted to create a simple build
Just installed the SDK and ADK. while updating, it gives the following error: unexpected
Just installed and migrated a 2008 solution on Vista ultimate 64 and .net 4.0.
Just installed EE everything seems clear however I can't seem to find a solution

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.