English 中文(简体)
C++ 从另一组集会和处理活动中学习妇女论坛的窗口
原标题:C++ Parenting a WPF window from another assembly and handling events

由于我相信演播室的视像是一 gl,我无法做这项工作,因此我真的赞赏有人会试图改变这种状况,分享所发生的情况。

I have setup in a solution 2 projects: - a C++ application which has been CLI enabled (.exe) - a C#/WPF class library which has a .xaml form inside with a matching .cs window class (.dll)

我想在我的C++申请中打开WPF的窗口,因此,我进口其参考资料,并创建新的窗口案例,并在新的应用环境下运作。 罚款。

我现在想摆脱这一窗口,处理从C#窗口的保护职能中继承的不同事件,因此,在C++组群中,儿童是电窗的.类。 罚款。

即:

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

然后,我把窗口一跳到位于C++组的母级,而不是位于C#组的基级。 现在,在装上我要求说,尽管基类工作,但未能从C#组装上xaml窗户时,我对C#类中最初的C部分应急部分产生了错误。 谁能对此作出解释/确定?

最佳回答

It looks like a common [library;user control]-[application;derived control] issue in WPF - I reproduced that even without C++. Without digging into explanation, general workaround is either aggregating "base" class or re-degisning base class to be templated control instead of user control (e.g. without .xaml file). If I understand correctly, your question is the same as The component does not have a resource identified by the uri question.

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签