Exemplo n.º 1
0
        public static async Task <OneDriveStorageFolder> OpenFolderPicker(string title, OneDriveStorageFolder rootFolder)
        {
            FoldersPickerControl folderPicker = new FoldersPickerControl(await rootFolder.GetFoldersAsync(100), rootFolder);

            ContentDialog dialog = new ContentDialog();

            dialog.Content           = folderPicker;
            dialog.Title             = title;
            dialog.PrimaryButtonText = "Ok";

            if (await dialog.ShowAsync() == ContentDialogResult.Primary)
            {
                return(folderPicker.SelectedFolder);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 2
0
        public static async Task <Toolkit.Services.OneDrive.OneDriveStorageFolder> OpenFolderPicker(string title, Toolkit.Services.OneDrive.OneDriveStorageFolder rootFolder)
        {
            FoldersPickerControl folderPicker = new FoldersPickerControl(await rootFolder.GetFoldersAsync(100), rootFolder);

            ContentDialog dialog = new ContentDialog
            {
                Content           = folderPicker,
                Title             = title,
                PrimaryButtonText = "Ok"
            };

            if (await dialog.ShowAsync() == ContentDialogResult.Primary)
            {
                return(folderPicker.SelectedGraphFolder);
            }
            else
            {
                return(null);
            }
        }