private async void itemPicker_Click(object sender, RoutedEventArgs e) { if (this.Client == null) { throw new ArgumentNullException("Client"); } _pickerPopup = new Popup(); _pickerPage = ItemPickerType == BoxItemType.File ? new BoxFilePickerPage(Client) as BoxItemPickerPage : new BoxFolderPickerPage(Client) as BoxItemPickerPage; _pickerPage.CloseRequested += filePickerPage_CloseRequested; _pickerPopup.Child = _pickerPage; var frame = (Frame)Window.Current.Content; var page = (Page)frame.Content; _pickerPage.SwapAppBar(page); _pickerPopup.IsOpen = true; await _pickerPage.Init(StartingFolderId.ToString(), StartingFolderName); }
protected async void itemPicker_Click(object sender, RoutedEventArgs e) { if (this.Client == null) { throw new ArgumentNullException("Client"); } _pickerPopup = new Popup(); _pickerPage = ItemPickerType == BoxItemType.File ? new BoxFilePickerPage(Client) as BoxItemPickerPage : new BoxFolderPickerPage(Client) as BoxItemPickerPage; _pickerPage.CloseRequested += filePickerPage_CloseRequested; _pickerPopup.Child = _pickerPage; // Add listener for the back key press _parent = this.GetParentOfType <PhoneApplicationPage>(); _parent.BackKeyPress += parent_BackKeyPress; // Hide existing appbar if present _pickerPage.SwapAppBar(_parent); _pickerPopup.IsOpen = true; await _pickerPage.Init(StartingFolderId.ToString(), StartingFolderName); }