CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    May 2011
    Posts
    7

    WPF Combo Box doesn't rollup until the event is processed.

    I have a small program which has a combobox and a text box on it.

    In the combo box selection changed event, i have something like this

    private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
    System.Threading.Thread.Sleep(10000);
    textBox1.Text = "Something";

    }

    When ever i select something from the combox box, it waits 10sec and displays "Something" in textBox1. But the problem here is until 10sec, the combobox stay open, then displays text and then rollup. That means it is waiting until selectionchanged event to completed to rollup.

    How can i make the combobox rollup(or close) ones a value is selected.

    I am attaching a picture, which shows the rolldown of combobox(If what i said above is not clear)

    Thank You for any help!!!!
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured