使用 Visual Studio 2012 在 wpf 工具包中找不到 AutoCompleteBox [英] AutoCompleteBox not found in wpf toolkit using visual studio 2012

查看:35
本文介绍了使用 Visual Studio 2012 在 wpf 工具包中找不到 AutoCompleteBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这确实是一个需要的功能,AutoCompleteBox(显然不是 AutoCompleteComboBox).但是,visual studio 2012 找不到 AutoCompleteBox 控件.但是我没有在vs的早期版本中尝试过,所以可能不是版本问题.

This is really a wanted feature, AutoCompleteBox (not AutoCompleteComboBox apparently). However, visual studio 2012 cannot find the AutoCompleteBox control. But I have not tried in earlier version of vs, so it may not be a version matter.

我安装了 wpf 工具包,并将这些扩展添加到了我的 WPF 项目中:

I installed wpf toolkit, added those extensions to my WPF project:

  • WPF 工具包
  • WPF 工具包设计
  • WPF 工具包输入设计
  • WPF 工具包输入 Visual Studio 设计
  • WPF 工具包布局
  • WPF 工具包布局 Visual Studio 设计
  • WPF 工具包 Visual Studio 设计.

在我看来几乎像 virii.每一个单词的排列都被使用......好吧,在我的 WPF 项目中,我添加了

Looks almost like virii to me. Every permutation of words are used... Well well in my WPF project, I added

xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"

到一个窗口并尝试添加一个自动完成框,如下所示:

to a window and tried to also add a auto complete box like this:

<toolkit:AutoCompleteBox />

但是AutoCompleteBox似乎不存在,我输入时列出的第一个组件

but AutoCompleteBox does not seem to exist, the first component that is listed when I have typed

<toolkit:

是 ButtonBaseBehavior.

is ButtonBaseBehavior.

推荐答案

并非所有工具包控件都包含在主"命名空间中.

Not all the toolkit controls are included in the "main" namepace.

让我解释一下工具包 dll 是如何构建的:

Let me explain it how are the toolkit dlls are built up:

您也可以通过 NuGet 安装 WPF 工具包:

You can also install the WPF toolkit through NuGet:

PM> Install-Package WPFToolkit

它将向您的项目添加三个 dll:

It will add three dlls to your project:

  • WPFToolkit.dll 这包含工具包的核心/稳定控件,可以在 xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"

  • WPFToolkit.dll this contains the core/stable controls of toolkit which can be found in the xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"

System.Windows.Controls.Input.Toolkit.dll 这个 dll 包含 preview 控件,如 AutoCompleteBox评分

System.Windows.Controls.Input.Toolkit.dll this dll contains the preview controls like AutoCompleteBox and Rating

System.Windows.Controls.Layout.Toolkit.dll 这个 dll 包含预览布局控件,如Accordion

System.Windows.Controls.Layout.Toolkit.dll this dll contains the preview layout controls like the Accordion

preview 控件不包含在主 xmls 命名空间中,因此您需要使用来自相应预览 dll 的命名空间:

The preview controlls are not included in the main xmls namespace so you need to use a the namespace form the corresponding preview dll:

xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"

<controls:AutoCompleteBox />

这篇关于使用 Visual Studio 2012 在 wpf 工具包中找不到 AutoCompleteBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆