Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for WinUI 3 & C++? #4044

Closed
nlogozzo opened this issue May 25, 2021 · 3 comments
Closed

Support for WinUI 3 & C++? #4044

nlogozzo opened this issue May 25, 2021 · 3 comments
Labels
duplicate 👥 Indicates that identical Issue or PR already exist question ❔ Issues or PR require more information

Comments

@nlogozzo
Copy link

Hi all,

I know that there is support for WinUI3 in this library, however it only works with C#. I thought WinUI 3 was supposed to support C# and C++ as the components are universal winrt components. Why doesn't this library work with C++ and how hard would it be to add support for C++.
I'm a C++ developer who is looking to build modern windows applications for the desktop and I need some controls, such as the DataGrid, provided by this library in my app.

Thanks in advanced!

@nlogozzo nlogozzo added the question ❔ Issues or PR require more information label May 25, 2021
@ghost ghost added the needs triage 🔍 label May 25, 2021
@ghost
Copy link

ghost commented May 25, 2021

Hello nlogozzo, thank you for your interest in Windows Community Toolkit!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible.. Other community members may also answer the question and provide feedback 🙌

@michael-hawker michael-hawker added duplicate 👥 Indicates that identical Issue or PR already exist and removed needs triage 🔍 labels May 25, 2021
@michael-hawker
Copy link
Member

Duplicate of #3704

Hi @nlogozzo not all components have to be universal or "Windows Runtime Components" which work with both languages. Developing Windows Runtime Components has more overhead and limitations on the developers, so we didn't go down that path in the Windows Community Toolkit. Therefore our controls are mainly targeted towards C# development only.

However, (at least on UWP) it is possible still to consume our components within a "C# Island". Basically you can wrap components within a UserControl which you could then place within your app as a whole section of your UI (good for things like DataGrids). This still pulls in the .NET runtime though so adds footprint to your app, which is why in the past we haven't prioritized showing how to integrate them (as we've heard that many C++ developers don't want that either).

These two docs show how this scenario works for UWP:

I've been working on putting a sample together for this.

However, I'm not sure how any of this applies to WinUI 3 yet. That's the next step in my journey for a future sample.

@michael-hawker
Copy link
Member

I've published our UWP based C++ sample here: https://github.com/CommunityToolkit/Sample-Windows-CppWinRT

I have a new issue tracking a similar sample for WinUI 3 here: CommunityToolkit/Sample-Windows-CppWinRT#3

@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate 👥 Indicates that identical Issue or PR already exist question ❔ Issues or PR require more information
Projects
None yet
Development

No branches or pull requests

2 participants