Esempio n. 1
0
        private async void ContactPanel_LaunchFullAppRequested(ContactPanel sender, ContactPanelLaunchFullAppRequestedEventArgs args)
        {
            LauncherOptions options = new LauncherOptions();

            options.TargetApplicationPackageFamilyName = "fa86aedc-86f1-4dfc-9ecf-04a41289f016_rkjxvw9zmwpp0";
            options.UI.PreferredPlacement = Windows.UI.Popups.Placement.Default;

            await this.Dispatcher.RunAsync(
                CoreDispatcherPriority.Normal,
                async() =>
            {
                await Launcher.LaunchUriAsync(new Uri($"ms-contact-profile:?ContactRemoteIds={_appContactId}"), options);
                sender.ClosePanel();
                args.Handled = true;
            });
        }
Esempio n. 2
0
        private async void AppContactPanel_LaunchFullAppRequested(ContactPanel sender, ContactPanelLaunchFullAppRequestedEventArgs args)
        {
            // callback to relaunch the sample app as a protocol launch with the remoteID for the current
            // contact as a launcher argument.
            args.Handled = true;
            await this.Dispatcher.RunAsync(
                CoreDispatcherPriority.Normal,
                async() =>
            {
                LauncherOptions options = new LauncherOptions();
                options.TargetApplicationPackageFamilyName = Windows.ApplicationModel.Package.Current.Id.FamilyName;

                await Launcher.LaunchUriAsync(new Uri($"{Constants.Protocol}:?ContactRemoteId={Uri.EscapeDataString(_appContactId)}"), options);
                sender.ClosePanel();
            });
        }