A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
Hello,
This is a known issue in WinUI.
According to Can't get parameters on URI activation #8855, you could use Environment.GetCommandLineArgs() to get the startup parameters.
Please refer to the following code:
#if WINDOWS
events.AddWindows(windows => windows.
OnLaunched((window, args) =>
{
var p = Environment.GetCommandLineArgs();
if (p != null)
{
Console.WriteLine(p);
}
}));
#endif
After testing, when the program is started with demyai://?para=test, the variable p can get this URI parameter.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.