RenderersLib - A Sample Project of XAML control as Windows Runtime Component and its Projection to NuGet package, then consume it in C# desktop application.
last update: 9/11/2022
The title is too long.
A sample of XAML control library in C++/WinRT and Projection project to NuGet Package. It will be comsumed in C# using Windows App SDK.
So the app will be C# based WinUI3 Desktop application using XAML Windows Runtime Component written in C++/WinRT (but still I don't know it is possible).
The develop branch is the newest.
Currently building WRC stops in compile error. This repository was made to ask Microsoft Q&A but welcome opinions from everyone.
does not match build architecture on Prorection project.
- Open solution file "RenderersLib.sln" in VisualStudio 2022.
- Restore NuGet packages.
- Build Solution.
- Error C2039 'BoxRenderer': is not a member of 'winrt::Renderers::implementation'.
-> fixed: move
#include "BoxRenderer.h"
from "BoxRenderer.cpp" to "pch.h".
- XAML custom (templated) controls with C++/WinRT
- Build XAML controls with C++/WinRT
- Generate a C# projection from a C++/WinRT component, distribute as a NuGet for .NET apps.
- These codes were made of Internet public resources (and Microsoft property, of course). So I don't insist license or else.
- English is not my domestic language. So fix rough sentences (gently, please).