你可以将公共WPF控件放入WPF用户类吗? [英] Can you drop a public WPF control into your WPF userclass?

查看:77
本文介绍了你可以将公共WPF控件放入WPF用户类吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一位同事有一个我不想复制的实用工具。我可以引用库类并使用他的控件吗?

A co-worker has a utility that I do not want to replicate. Can I reference the library class and use his control?

推荐答案

通常,是的。您可以添加对库的引用,并且用户控件应显示在工具箱中。然后,您可以将此控件放到WPF窗口中,并像使用任何内置控件一样使用它。



唯一需要注意的是,如果你的同事有一些奇怪的相互依赖关系,或者设置控件的方式只能用于不同的应用程序,那么很难在你的应用程序中使用。
Typically, yes. You can add a reference to the library and the user control should show up in your toolbox. You can then drop this control onto your WPF window and use it just like any built-in control.

The only caveat is that if your co-worker has some strange inter-dependencies or has set up the control in such a way that it can only be used in a different application, then it will be difficult to use in yours.


这篇关于你可以将公共WPF控件放入WPF用户类吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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