M
M
Maxim2017-09-23 23:33:39
.NET
Maxim, 2017-09-23 23:33:39

How to create a WPF Window in a Dll?

How to create a WPF window (not UserControl) in a class library?
PS Describe a window and a class, and store it in a class property.
Purpose: To load a dll into the program, it takes a window from there (there is a special attribute, and a property of the class ....), and opens it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tom Nolane, 2017-09-23
@Got_Oxidus

standard... include dll (add references)
include using namespace in your xaml.cs
in any convenient method create a new window class instance... further SHOW();... profit...
----------- -------------------------------------------------- -----
conditionally like this:
1) connected dll
2) basically xaml.cs

using MyWindowInDLL;

....
...
 public MainWindow()
        {
            InitializeComponent();
            var wind = new MyWindowInDLL.SuperWindow();
            wind.Show();
        }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question