Exemple #1
0
        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
        }
Exemple #2
0
 public RenameDialogClosedEventArgs(RenameDialog.Result dialogResult)
 {
     DialogResult = dialogResult;
 }