public MainPage() { InitializeComponent(); StackyClient client = new StackyClient("0.9", "", Sites.StackOverflow, new UrlClient(), new JsonProtocol()); client.GetUsers(users => { DataContext = new MainPageViewModel(users); //MessageBox.Show(String.Format("There are {0} total users", users.TotalItems)); }, error => { MessageBox.Show(error.Message); }); }