Add WinUI control to control library #10562
-
I am following these instructions to create a control library.
I'm not really sure what "your project" means since dependencies are per-platform. My intent is to use WinUI 3 and when I look at Dependencies/netstandard2.0/packages I see a reference to Uno.WinUI 4.6.19 so I presume I'm good there. Problem is when I "Right-click on the project library, then Add, New Item" per the doc I only see UWP templates. The words "Choose the template flavor..." make me think I should see WinUI as well as UWP (??). When I choose Custom Contro (Uno Platform UWP) a control is added to the project however references to Windows.UI.Xaml.Controls, Windows.UI.Xaml.Data, etc. are not found the project does not build. How can I create a WinUI control in the project? I am targeting .net 7 per my question here. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
We're currently adjust those templates so that they fit better with the WinUI/WinAppSDK scenario. In the meantime, you can create a UWP one, then rename anything |
Beta Was this translation helpful? Give feedback.
We're currently adjust those templates so that they fit better with the WinUI/WinAppSDK scenario. In the meantime, you can create a UWP one, then rename anything
Windows.UI.Xaml
toMicrosoft.UI.Xaml
in both the.xaml
and.xaml.cs
files.