How to implement Widgets Provider in a vanilla UWP app? #3832
-
Hi, I was thinking about adding Widgets support to my UWP apps, so I spent a day reading available documentation/guides and tried some samples, but it looks like it is not possible to implement Widgets Provider directly in my C#/UWP app, is that right? Widgets SDK right now requires the WinAppSDK dependency, and it is not possible to include the Microsoft.WindowsAppSDK nuget in my UWP app - I get error's that my app needs to target at least dotnet6.0. Also, I don’t plan to rewrite my UWP app to WinUI just to get Widgets support. I found this “guide” on how to include widgets in UWP app using some Desktop Bridge and COM server shenanigans, but it looks really complicated. https://nicksnettravels.builttoroam.com/uwp-widget/ So, my question is
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I think you can refer to Widget Providers: https://learn.microsoft.com/en-us/windows/apps/develop/widgets/implement-widget-provider-cs |
Beta Was this translation helpful? Give feedback.
-
Hi @martinsuchan, thanks for your interest in Widgets Platform :) To answer your questions in order:
|
Beta Was this translation helpful? Give feedback.
Hi @martinsuchan, thanks for your interest in Widgets Platform :)
To answer your questions in order:
So to implement and enable a WidgetProvider - you'll need an app that can run in Medium IL. The easiest way to get a WidgetProvider working with a UWP app is to use a desktop extension. In essence, the idea is the same as you've already discovered in that guide: make a separate desktop app that will act as a
WidgetProvider
and communicate with it from your UWP …