コード例 #1
0
        public async Task ShowWalletItemAsync()
        {
            WalletItem walletItem = await wallet.GetWalletItemAsync("CoffeeLoyalty123");

            // If the item exists, show it in Wallet
            if (walletItem != null)
            {
                // Launch Wallet and navigate to item
                await wallet.ShowAsync(walletItem.Id);
            }
            else
            {
                // Item does not exist, so just launch Wallet.
                // Alternatively, you could tell the user that the item they want to see does not exist
                // and stay in your app.
                await wallet.ShowAsync();
            }
        }
 private async void View_Click(object sender, RoutedEventArgs e)
 {
     if (walletItem == null)
     {
         rootPage.NotifyUser("Item does not exist. Add item using Scenario2", NotifyType.ErrorMessage);
     }
     else
     {
         await wallet.ShowAsync(walletItem.Id);
     }
 }
コード例 #3
0
 private async void Button_Click(object sender, RoutedEventArgs e)
 {
     // Launch Wallet
     await wallet.ShowAsync();
 }