WPFToolkit的安装与使用


在WPFToolkit中包含了DataGrid,AutoCompleteBox,Accordion,Rating等等,我们常用的控件。

WPFToolkit官方网站

Installation and Usage Instructions
Please note: The WPF Toolkit is dependent on .NET Framework 3.5 SP1. You must install .NET Framework 3.5 SP1 in order to use any features in the Toolkit.

Instructions for using the WPF Toolkit binaries:
Install .NET Framework 3.5 SP1
If you have a previous version of WPF Toolkit installed, uninstall it through the Remove Programs dialog on the Control Panel (look for “WPF Toolkit October 2008” or “WPF Toolkit January 2009” or “WPF Toolkit March 2009” or “WPF Toolkit June 2009”)
Download the WPFToolkit_Binaries or WPFToolkit_BinariesAndSource
Run the WPFToolkit.msi to install the WPFToolkit.dll and WPF Toolkit design time binaries to your Program Files folder
Reference the binaries in your project:
Reference WPFToolkit.dll in your project
Add a using statement (“using Microsoft.Windows.Controls;”) to the top of .cs files
Add a new xmlns (for example, xmlns:toolkit=”http://schemas.microsoft.com/wpf/2008/toolkit”) to the top of XAML files
Remember to use the namespace prefix (in the above example, ) in the body of your XAML、

1.下载 WPFToolkit.msi

2.安装 WPFToolkit.msi

3.引用 WPFToolkit.dll到你的项目

4. 在.cs文件中加入using Microsoft.Windows.Controls;

5.在 .xaml文件中加入xmlns:toolkit=”http://schemas.microsoft.com/wpf/2008/toolkit”

6.然后在使用<toolkit:使用控件


《 “WPFToolkit的安装与使用” 》 有 3 条评论

  1. 你好,没找到你的Email,只好在这留言了
    不知道能不能看到
    文章中介绍了WPFToolkit在xaml页面的用法
    但是现在有一个问题
    刚下载了一个WPF导出Excel的例子,它用的是.net4.0
    在ExcelHelper.cs中用到了DataGrid类型
    很郁闷,3.5里面是没有这个类型的
    可以用[DllImport(“WPFToolkit.dll”)]吗?
    但又不得其入口
    请问有没有碰到过这样的问题或解决办法
    Thanks
    如果可以的话请发Email给我 [email protected]

  2. [DllImport(“WPFToolkit.dll”)]这样肯定是不可以的啊。。。

    你尝试下3.5的WPFToolkit,或者改下源码,研究研究吧~

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

验证码 * Time limit is exhausted. Please reload CAPTCHA.