コード例 #1
0
        public async Task<string> CallInputModal(MetroWindow metroWindow, string title, string message)
        {
            var metroDialogSettings = new MetroDialogSettings
            {
                CustomResourceDictionary =
                    new ResourceDictionary
                    {
                        //TODO: Change from default
                        Source = new Uri("pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.MahApps.Dialogs.xaml")
                    },
                NegativeButtonText = "CANCEL",
                SuppressDefaultResources = true
            };

            return await metroWindow.ShowInputAsync(title, message, metroDialogSettings);
        }