如何通过使用WPF ToolBox控件模板将自定义WPF控件添加到ToolBox中 [英] How to add my custom WPF control to the ToolBox by using the WPF ToolBox Control template

查看:364
本文介绍了如何通过使用WPF ToolBox控件模板将自定义WPF控件添加到ToolBox中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义控件,打包为myControl.dll.如何使用WPF ToolBox控件模板在VS2010中安装它?我不想使用选择工具箱..."或拖放"技术.

I have a custom control packed as myControl.dll. How to install it in VS2010 by using the WPF ToolBox Control template? I do not want to use the "Choose Toolbox..." or "Drag and Drop" techniques.

推荐答案

我写了一篇有关该主题的详尽教程文章:

I wrote a thorough tutorial article on the topic:

Visual Studio工具箱控件集成

选择项目..."是手动安装的最简单选择,本文也对此进行了讨论.

The "Choose Items..." is easiest choice for manual installation and is discussed in the article as well.

您还可以将控件捆绑在VSI,VSIX或VSPackage中,使用VS自动化对象模型(DTE)或与VS2010一起预安装的现有包,以及更新的称为Toolbox控件安装程序(TCI)的包.

You can also bundle the control in VSI, VSIX or VSPackage, use VS Automation Object Model (DTE) or existing package pre-installed with VS2010 and newer called Toolbox Controls Installer (TCI).

据我所知,拖放操作不适用于VS Toolbox.

Drag and drop does not work for VS Toolbox as far as I know.

这篇关于如何通过使用WPF ToolBox控件模板将自定义WPF控件添加到ToolBox中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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