>Hi,
>
>I have a textbox which binds to some underlying data. I also have an autocomplete combobox which I want to use to allow better searching than a plain combo will. However, it cannot bind to the underlying data (or at least I haven't been able to make it). So what I am trying to do is only show the autocomplete combo when the user actually clicks or moves to the textbox. Initially I make the combo invisible, then in the gotfocus of the textbox I want to hide the textbox and show the combo. I've tried this code:
>
>
private void txtCus_Number_GotFocus(object sender, RoutedEventArgs e)
> {
> this.txtCus_Number.Visibility = Visibility.Hidden;
> this.autoCustomers.Visibility = Visibility.Visible;
> this.autoCustomers.Focus();
>
> }
>
> private void autoCustomers_LostFocus(object sender, RoutedEventArgs e)
> {
> this.autoCustomers.Visibility = Visibility.Hidden;
> this.txtCus_Number.Visibility = Visibility.Visible;
>
> }
>
>
>but the textbox never gets hidden. In VFP I might put a NODEFAULT in the gotfocus code. Is there something similar in C# or should I do this a different way?
Try Visibility.Collapsed instead. But you should be able to bind the autocomplete version. What have you tried ?