且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

你可以将公共WPF控件放入WPF用户类吗?

更新时间:2023-12-06 09:27:58

通常,是的。您可以添加对库的引用,并且用户控件应显示在工具箱中。然后,您可以将此控件放到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.