예제 #1
0
        private async void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            CurrencyName dialog = new CurrencyName();

            dialog.UniqueCode          = ViewModel.UniqueCode;
            dialog.IsUniqueCodeEnabled = false;
            dialog.Symbol = ViewModel.Symbol;

            dialog.PrimaryButtonText = "Update";

            ContentDialogResult result = await dialog.ShowAsync();

            if (result == ContentDialogResult.Primary || dialog.IsEnterPressed && ViewModel.Symbol != dialog.Symbol)
            {
                await commandDispatcher.HandleAsync(new ChangeCurrencySymbol(ViewModel.UniqueCode, dialog.Symbol));
            }
        }