How to pass arguments when launch by uri #4351
-
I launch my winui3 app with: var uriapp = new Uri("uri-app-name:");
var result = await Windows.System.Launcher.QueryUriSupportAsync(uriapp, Windows.System.LaunchQuerySupportType.Uri);
if (result == Windows.System.LaunchQuerySupportStatus.Available)
{
await Windows.System.Launcher.LaunchUriAsync(uriapp);
} But how can i deliver arguments and receive arguments in: protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
var uwp_args = args.UWPLaunchActivatedEventArgs;
// if launched by uri, fetch arguments
if (uwp_args.Kind == ActivationKind.Protocol)
{
var my_args = args.Arguments;
} |
Beta Was this translation helpful? Give feedback.
Answered by
eduardobragaxz
Apr 17, 2024
Replies: 1 comment 1 reply
-
Does args.UWPLaunchActivatedEventArgs return anything? I think you have to use something like this
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
MemeTao
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does args.UWPLaunchActivatedEventArgs return anything? I think you have to use something like this