0

is there a way to determine whether the user opend the uwp app with a double click on the file or whether the user used "open with" (for example right click on the file open with; or Photos app -> open with).

In both scenarios the app will be launched with FileActivetedEventArgs with the verb "open". Any ideas?

Briefkasten
  • 1,964
  • 2
  • 25
  • 53
  • Maybe you can try to override OnLaunched and check LaunchActivatedEventArgs.Kind parameter. Actually after reading the help pages, it seems that OnFileActivated is only called in your app if it is the registered app for a file type and a file of that type was opened. – o_weisman Jul 04 '18 at 10:51
  • In both scenarios the LaunchActivatedEventArgs.Kind is typ ActivationKind.File – Briefkasten Jul 04 '18 at 10:53

1 Answers1

1

In both scenarios the app will be launched with FileActivetedEventArgs with the verb "open". Any ideas?

Currently, you could not figure out the UWP app opened with file double click or open with scenario, because the final executor is same, and the opening action was managed with system. The file and the executor were isolated by operation system. This is for modularity.

If you need this new feature, please feel free to ask for this feature on UserVoice.

Nico Zhu
  • 32,367
  • 2
  • 15
  • 36