如何在运行时添加新的UserControl [英] How to adding a new UserControl in runtime

查看:95
本文介绍了如何在运行时添加新的UserControl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个WPF MainWindow,它正在运行,并且也是由xaml用户控件在新项目中编写的,并编译为dll.
我想在运行时将此xaml或dll添加到MainWindow中. 例如在其他软件上添加插件或工具提示.我该怎么办?

预先感谢;)

Hi,

I have a WPF MainWindow that its running and also is wrote by a xaml user control in a new project and compile to dll.
I want add this xaml or dll into the MainWindow at runtime.
like adding a plug-in or tool idea on other softwares. What should I do?

Thanks in advance;)

推荐答案

看这篇文章,它们是相似的.

自包含程序集 [
Look at this article, they are similar.

Self Contained Assembly[^]


尝试
在C#WPF应用程序中创建动态控件(第1部分) [^ ]
在C#WPF应用程序中创建动态控件(第2部分) [^ ]
Try
Dynamic Controls creation in a C# WPF Application (Part 1)[^]
Dynamic Controls creation in a C# WPF Application (Part 2)[^]


这篇关于如何在运行时添加新的UserControl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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