WinUI-Gallery icon indicating copy to clipboard operation
WinUI-Gallery copied to clipboard

Add C++ examples

Open jaigak opened this issue 4 years ago • 4 comments

Some samples have code behind examples in addition to XAML but all of them are only for C#.

jaigak avatar Jun 25 '21 13:06 jaigak

Will be fine...it's almost imposible right now to find documentation, samples or real world code using C++/WinRT and WinUI 3

pablojimpas avatar Jul 12 '21 17:07 pablojimpas

This project is awesome! Lots of cool controls! Would be great if you can add C++ examples! I would very much like to learn from some C++ examples so that I can develop Windows desktop applications using C++ with all these cool controls!

zhanglin-wu avatar Dec 24 '21 06:12 zhanglin-wu

Thank you for the suggestions. I've taken note of your feedback and I'll check to see what is possible 🙂

gregwoo-microsoft avatar Jan 04 '22 21:01 gregwoo-microsoft

C++ examples would also ease the pain of XAML C++ development experience, without VS tooling support since C++/CX got deprecated.

pjmlp avatar Jun 09 '22 09:06 pjmlp

We currently don't have C++ samples anywhere in the app. At that point, it would be worth discussing a full C++ version of the app. That is not in scope at this time.

bpulliam avatar Jan 25 '23 15:01 bpulliam

Maybe there should be some official communication that WinUI is becoming only about C#, and C++/WinRT is for low level components.

pjmlp avatar Jan 25 '23 17:01 pjmlp

We currently don't have C++ samples anywhere in the app. At that point, it would be worth discussing a full C++ version of the app. That is not in scope at this time.

You don't really need to write the application in C++ to provide translated samples inside the app along with the C# example.

jaigak avatar Jan 27 '23 14:01 jaigak

We currently don't have C++ samples anywhere in the app. At that point, it would be worth discussing a full C++ version of the app. That is not in scope at this time.

You don't really need to write the application in C++ to provide translated samples inside the app along with the C# example.

It is more or less if the sample code should also be verified and actually work. The only other option would be to manually paste the sample code in some C++ project and see if it works but the effort of doing that for every sample doesn't seem that much lower than just writing a C++ app containing all samples.

marcelwgn avatar Jan 27 '23 15:01 marcelwgn

There are already several C++/WinRT samples for Windows App SDK. An example is applying Mica, which the WinUI 3 Gallery app only has code example for C# while the docs has for C++ as well: https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/system-backdrop-controller#example-use-mica-in-a-windows-appsdkwinui-3-app (switch to C++/WinRT in the page first).

jaigak avatar Jan 28 '23 04:01 jaigak

Sure there are some C++/WinRT samples for the WinAppSDK, after all, nobody claimed is impossible. However the WinUI Gallery is closing in on 250 samples. Writing C++ sample code for all of them in a manner that is maintainable and sustainable is (almost) the same effort as rewriting the app in C++.

marcelwgn avatar Jan 28 '23 07:01 marcelwgn

No, I do not agree. You can still provide some sample code for C++, just like some docs pages.

jaigak avatar Mar 28 '23 12:03 jaigak

@gregwoo-microsoft said we are welcome to provide C++ sample code through PR. Let's contribute, C++ developers!

sotanakamura avatar Apr 12 '23 03:04 sotanakamura

@gregwoo-microsoft said we are welcome to provide C++ sample code through PR. Let's contribute, C++ developers!

After the way they dealt with C++/CX tooling, dropping us into C++/WinNT clunky tooling, despite the money that we pay in licenses for Windows, Visual Studio and everything else?

Surely they can get some scraps from Activision/Blizzard deal to pay a couple of interns to write such examples in their beloved C++/WinRT.

pjmlp avatar Apr 12 '23 05:04 pjmlp