MicrosoftDocs / winrt-api

WinRT reference content for developing Microsoft Universal Windows Platform (UWP) apps
Creative Commons Attribution 4.0 International
231 stars 499 forks source link

Missing C++/winrt sample #2450

Closed HunterB06 closed 9 months ago

HunterB06 commented 9 months ago

Hello,

When selecting C++/winrt on the language select box, the samples displayed on the page are still C#.

They should be in C++/winrt.

Regards,


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

stevewhims commented 9 months ago

Yes, in fact on API reference topics like this one, that language picker affects only the "Syntax" section. It doesn't affect the code examples that exist in the topic.

Providing code examples in C# is the first priority. Then, usually if the scenario would especially benefit from it, we try to provide a C++/WinRT version also. For example, the Win2D "Hello, World!" quickstart does have a C++/WinRT version.

However, that wouldn't be good ROI for every code example. Many of them are quite mechanical to port to C++. So for those cases, we have resources such as the C++/WinRT content in general, and then the Porting the Clipboard sample to C++/WinRT from C#—a case study and Move to C++/WinRT from C# topics in particular.

So I'll close this issue for now.

-Steve