public MainPage() { this.InitializeComponent(); _main = ViewModelLocator.Main; // Attach the event handler for when an item is selected boxFilePicker.ItemSelected += boxItemPicker_ItemSelected; boxFolderPicker.ItemSelected += boxItemPicker_ItemSelected; }
// Constructor public MainPage() { InitializeComponent(); _main = ViewModelLocator.Main; this.ApplicationBar.IsVisible = false; oauth.AuthCodeReceived += async (s, e) => { var auth = s as OAuth2Sample; if (auth == null) return; await _main.Init(auth.AuthCode); Dispatcher.BeginInvoke(() => { this.ApplicationBar.IsVisible = true; }); }; }