Hi sir
Ok, I want loading any
UserContols
as DLL on a
MainWindow
project as host by selecting them in runtime.
I tried this article
SelfContainedAssembly[
^] and I converted it to a WPF project that you can see
MyProject[
^], also test it with StackPanel and etc succesfully, but I want develope a WPF UserControl project like this
<usercontrol x:class="ManyWpfControlLibrary.UserControl1" xmlns:x="#unknown">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="150" d:DesignWidth="300">
<grid removed="#FFFA8383">
</grid>
</usercontrol>
with code-behind
namespace ManyWpfControlLibrary
{
public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComponent();
}
}
}
This UserControl compiled to a DLL file, finally it would insert into my MainWindow project at runtime, but I couldn't to do this.
In fact, we haven't aware about the DLL (UserControl compiled), it created and developed offline by another persons and there is on a different assembly, only we load and insert it on the main project at runtime!
Help me about this method or another idea. If the issue is ambiguous and you got the idea, please you edit this post to more understanding.
Thanks in advance.