Last active
August 29, 2015 14:00
-
-
Save wadewegner/11270012 to your computer and use it in GitHub Desktop.
Code for blog post on DeveloperForce.WindowsPhone.Login NuGet accelerator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NavigationService.Navigate(new Uri("/Pages/AccountsPage.xaml", UriKind.Relative)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var app = (Application.Current as App); | |
| if (app != null) | |
| { | |
| if ((!string.IsNullOrEmpty(app.InstanceUrl)) & (!string.IsNullOrEmpty(app.AccessToken))) | |
| { | |
| var client = new ForceClient(app.InstanceUrl, app.AccessToken, "v29.0"); | |
| var accounts = await client.QueryAsync<Account>("SELECT id, name, description FROM Account"); | |
| AccountsList.ItemsSource = accounts.records; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public string AccessToken { get; set; } | |
| public string RefreshToken { get; set; } | |
| public string InstanceUrl { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <phone:WebBrowser x:Name="WebBrowser" Navigating="WebBrowser_Navigating" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment