Unable to add AutoCompleteBox to toolbox or handcrafting XAML

扶醉桌前 提交于 2019-12-11 21:11:28

问题


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?


回答1:


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




回答2:


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


来源:https://stackoverflow.com/questions/2386010/unable-to-add-autocompletebox-to-toolbox-or-handcrafting-xaml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!