Skip to content

Instantly share code, notes, and snippets.

@christiannagel
Created October 2, 2018 15:29
Embed
What would you like to do?
Protocol activation of the UWP app
protected override void OnActivated(IActivatedEventArgs args)
{
base.OnActivated(args);
if (args.Kind == ActivationKind.Protocol)
{
Frame rootFrame = Window.Current.Content as Frame;
if (rootFrame == null)
{
rootFrame = new Frame();
Window.Current.Content = rootFrame;
rootFrame.Navigate(typeof(MainPage), "protocol activated");
}
Window.Current.Activate();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment