Unable to add AutoCompleteBox to toolbox or handcr

2019-09-15 08:10发布

I'm trying to use the AutoCompleteBox control from the february release of WPFToolkit.

I install the toolkit using the .msi file, add the assembly reference, and only two new controls appears in my toolbox: Calendar and Datepicker. I then tried to handcraft the XAML as shown in WPF: AutoComplete TextBox, ...again, but once again, the AutoCompleteBox is missing.

Also, since I've installed WPFToolkit, my toolbox has some strange behavior, like deleting all elements and not letting me add any new control.

Does anyone have had the same issues, and know how to solve them?

2条回答
Lonely孤独者°
2楼-- · 2019-09-15 08:33

Try this:

  1. Within VS right click on the Toolbox
  2. Select "Reset Toolbox".

If that doesn't work:

  1. Stop Visual Studio
  2. Go to: &lt;drive&gt;:\Documents and Settings\<user>\Local Settings\Application Data\Microsoft\VisualStudio\&lt;VS version&gt;
  3. Delete the hidden files:
    • toolbox.tbd
    • toolbox_reset.tbd
    • toolboxIndex.tbd
    • toolboxIndex_reset.tbd
  4. Start Visual Studio
查看更多
手持菜刀,她持情操
3楼-- · 2019-09-15 08:52

I had the same problem. You probably still need to add a reference to System.Windows.Controls.DataVisualization.Toolkit. That fixed it for me.

查看更多
登录 后发表回答