private async Task<string> GetNewName() { #if WINDOWS_PHONE_APP RenameDialog dialog = new RenameDialog(); var result = await dialog.ShowAsync(); if(result == ContentDialogResult.Primary) { return dialog.NewName; } else { return null; } #elif WINDOWS_UWP return null; #else RenameDialog dialog = new RenameDialog {IsOpen = true}; if((await dialog.WhenClosed()).DialogResult == RenameDialog.Result.Ok) { return dialog.NewName; } else { return null; } #endif }
public RenameDialogClosedEventArgs(RenameDialog.Result dialogResult) { DialogResult = dialogResult; }