Questions tagged [windows-app-sdk]

The Windows App SDK provides a unified set of APIs and tools that can be used by desktop apps on Windows 11 and 10. It includes features like WinUI 3, tools for App Lifecyle management, windows management, and more.

112 questions
0
votes
0 answers

WinUI3 : How to close a WinUI3 window without stopping the event loop

I'm working on a WinUI3 desktop application in C++. I'm trying to build a multiwindow application that will be still running and accepting events even when all the Windows are closed. In WinUI3, the event loop(Application::Start()) will terminate…
Harshith
  • 181
  • 2
  • 9
0
votes
1 answer

WinUI3 : How to get the WinUI3 window back from its respective HWND

I'm working on the WinUI3 desktop application. I'm trying to set an ID to the winui3 window and get the WinUI3 window back with only the ID. I could not find any direct way to do this. I tried to extract HWND from the WinUI3 window and set the ID…
0
votes
1 answer

WindowsAppSDK: How to add new items to the custom control field?

I have a custom control with a collection-type field. When i run the app in debug mode and try to add items to the field, the XAML editor show the error: Error XHR0015 Failed to add HelloItem to ObservableCollection`1. Unable to find element. Why…
jhon tonini
  • 67
  • 3
  • 7
0
votes
1 answer

How to send email with attachments in WinUI app?

My application is a WinUI desktop application using .Net 6. WinExe net6.0-windows10.0.19041.0 true I thought I could use the EmailManager from UWP (which supports…
Batesias
  • 1,914
  • 1
  • 12
  • 22
0
votes
1 answer

WinUI application running as Administrator?

I'm trying to write a WinUI 3 desktop app the requires the Administrator role. It does some msiexec work on behalf of the user, and this pretty much demands being admin as far as I can tell. The app itself will be an unpackaged…
0
votes
4 answers

UWP/WinUI3 How to get system theme in C#?

Is there a programming way to access the system theme (i.e., theme for Windows)? The similar question #UWP get system theme (Light/Dark) is answered here: var DefaultTheme = new Windows.UI.ViewManagement.UISettings(); var uiTheme =…
Frank
  • 136
  • 1
  • 10
0
votes
1 answer

WinUI3 : How to put an translucent grey overlay on Canvas

I'm working on a WinUI3 desktop application in c++. I was trying to achieve an experience where we can show a ProgressRing in the center of the screen when there is a delay in screen update. In my application, my window has a Canvas as its content…
Harshith
  • 181
  • 2
  • 9
0
votes
1 answer

C++/WinRT WinUI3: How to get html source code by WebView2?

I'm trying to use a webview2 control to get the body text of a website. But nothing showed. My code: winrt::Windows::Foundation::IAsyncAction MainWindow::myButton_Click(IInspectable const&, RoutedEventArgs const&) { …
Extremeer
  • 13
  • 3
0
votes
2 answers
0
votes
0 answers

c# AccessViolationException in .NET 7.0

I have this Global Keyhook I found somewhere online which worked perfectly. Then when I updated to .NET 7.0 and Visual Studio 7.4, and migrated from UWP to the Windows App SDK with the .NET Upgrade Assistant It broke with an…
DitherDude
  • 64
  • 6
0
votes
1 answer

How to make Windows Community Toolkit datagrid editable in WinUI3 desktop app?

I am using Windows Community Toolkit datagrid in my WinUI3 desktop application. It works ok but I can't make it editable in-place though in docs they mention it should work.
demonplus
  • 5,613
  • 12
  • 49
  • 68
0
votes
1 answer

Are .winmd files required at run-time or just at build time

I have written a Windows App SDK based library using C++/WinRT. When I build that library, I get a dll with and an associated winmd file that describes the types stored in my dll. I then consume that library in a Windows App SDK based app project…
ackh
  • 1,648
  • 2
  • 18
  • 36
0
votes
0 answers

WinUI 3 - shell interop vs MS Store ecommerce privileges

Considering the sandboxing factor, and OTH that MS appears to be giving renewed attention to the value of desktop in the aftermath of UWP/Win 8 failings, could a WinUI 3 app, granted some level of trust below corporate/institutional, be permitted to…
Phil G
  • 39
  • 1
  • 6
0
votes
2 answers

WinUI notifications: COM exception is raised when instanciating instance of "AppNotification"

I wanted to include notifications in my existing WinUI 3 application which uses Windows App SDK 1.1.4 and .NET 6 (The application does not and shall not use packaging / MSIX). In order to achieve this, I tried to extract some code of an example…
Martin
  • 5,165
  • 1
  • 37
  • 50
0
votes
2 answers

MSIX Installer and dependencies

I have a Windows App SDK based desktop application. I am using the single-project MSIX packaging in VS2022. What I need to figure out is how to get the installer to launch 3rd party installers (Nvidia Cuda for instance) as part of the application…
Zeek
  • 51
  • 1