C ++ Parenting a WPF window from another assembly and event handling

I was unable to complete this work due to what I consider to be a mistake in Visual Studio, so I would really appreciate if someone could try to solve this situation and share what is happening.

I have a setup in solution 2 of the project: - C ++ application included by CLI (.exe) - C # / WPF class library, which has a .xaml form inside with the corresponding windows class .cs (.dll)

I want to create a WPF window inside my C ++ application, so I import its link and create a new instance of the window and run it in a new application context. Thats works great.

Now I want to make classes from this window and handle various events inherited from protected functions in the C # window, so on the C ++ assembly, make the ref class public, which is the .cs class for a window with a .xaml window. It compiles fine.

t

public ref class myCPPWindow : myWPFWindow { ... };

Then I change the window, which I will tear down, to the parent class that is in the C ++ assembly, and not to the base class located in the C # assembly. Now I get an error in the InitializeComponent () part of the C # base class when loading the .xaml window, which I need to say that it cannot load the source of the .xaml window from the C # assembly, even if the base class is working. Can someone give an explanation / fix for this?

+3
source share
1 answer

, WPF : - [; ] - ++. , "" , , , (, .xaml ). , , , uri.

+1

All Articles