Consume a C# component with WinUI 3 controls from a Win32 project #2035
Unanswered
Iordan-Iulian-Bogdan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I followed this tutorial https://learn.microsoft.com/en-us/windows/apps/develop/platform/csharp-winrt/create-winrt-component-winui-cswinrt and I would like to do the same thing but from a Win32 project and I am stuck.
I have a Win32 application which can create WinUI windows by loading an xbf file, the problem is that I want to use a datagrid custom control which is only available for C#, this works fine when I use it from a WinUI C++ application but I don't know how to get this working from within a Win32 app.
For instance in my c++ app I can add the datagrid like so in MainWindow.xaml.cpp:
NameReporter is a custom control which contains a datagrid.
I went through the same steps like in the tutorial for my Win32 app but this line :
m_reporter = winrt::WinUIComponentCs64::NameReporter();
crashes my app, it complains about something related to CoreMessagingXP.dll but I don't know how to fix it, I am sure something is not configured properly,Beta Was this translation helpful? Give feedback.
All reactions