Exemple #1
0
        /// <summary>
        /// Invoked when the Activated event is raised, this can be raised from a toast notification being tapped
        /// </summary>
        /// <param name="e">The toast activated argments</param>
        protected override void OnActivated(IActivatedEventArgs e)
        {
            // if e is from a toast notification then cast it and strip the argument out.
            var argument = e as ToastNotificationActivatedEventArgs;

            if (argument == null)
            {
                return;
            }
            // strip the IncidentId out of the argument
            int incidentId = ToastHelper.GetIncidentNumber(argument.Argument);

            Window.Current.CoreWindow.KeyDown += ApplicationKeyDown();

            // Navigate to the incident
            Frame rootFrame = (Frame)Window.Current.Content;

            rootFrame.Navigate(typeof(MainPage), new IncidentSelectedEventArgs(incidentId));
        }