diff --git a/MahApps.Metro/Controls/Dialogs/BaseMetroDialog.cs b/MahApps.Metro/Controls/Dialogs/BaseMetroDialog.cs index 0d6e307349..9c73256b7f 100644 --- a/MahApps.Metro/Controls/Dialogs/BaseMetroDialog.cs +++ b/MahApps.Metro/Controls/Dialogs/BaseMetroDialog.cs @@ -14,7 +14,7 @@ namespace MahApps.Metro.Controls.Dialogs /// The base class for dialogs. /// /// You probably don't want to use this class, if you want to add arbitrary content to your dialog, - /// use the class. + /// use the class. /// public abstract class BaseMetroDialog : ContentControl { diff --git a/MahApps.Metro/Controls/Dialogs/CustomDialog.cs b/MahApps.Metro/Controls/Dialogs/CustomDialog.cs new file mode 100644 index 0000000000..b2053b9a41 --- /dev/null +++ b/MahApps.Metro/Controls/Dialogs/CustomDialog.cs @@ -0,0 +1,8 @@ +namespace MahApps.Metro.Controls.Dialogs +{ + /// + /// An implementation of BaseMetroDialog allowing arbitrary content. + /// + public class CustomDialog : BaseMetroDialog + { } +} \ No newline at end of file diff --git a/MahApps.Metro/Controls/Dialogs/SimpleDialog.cs b/MahApps.Metro/Controls/Dialogs/SimpleDialog.cs deleted file mode 100644 index e04481d643..0000000000 --- a/MahApps.Metro/Controls/Dialogs/SimpleDialog.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Markup; - -namespace MahApps.Metro.Controls.Dialogs -{ - /// - /// A simple implementation of BaseMetroDialog allowing arbitrary content. - /// - public class SimpleDialog : BaseMetroDialog - { } -} diff --git a/MahApps.Metro/MahApps.Metro.NET45.csproj b/MahApps.Metro/MahApps.Metro.NET45.csproj index e967251a75..5df2bbb078 100644 --- a/MahApps.Metro/MahApps.Metro.NET45.csproj +++ b/MahApps.Metro/MahApps.Metro.NET45.csproj @@ -92,6 +92,7 @@ + @@ -99,7 +100,6 @@ - diff --git a/MahApps.Metro/MahApps.Metro.csproj b/MahApps.Metro/MahApps.Metro.csproj index 0884391f5a..d89241cd33 100644 --- a/MahApps.Metro/MahApps.Metro.csproj +++ b/MahApps.Metro/MahApps.Metro.csproj @@ -100,7 +100,7 @@ - + diff --git a/Mahapps.Metro.Tests/CustomDialogTest.cs b/Mahapps.Metro.Tests/CustomDialogTest.cs index fb72baa03d..08345d802d 100644 --- a/Mahapps.Metro.Tests/CustomDialogTest.cs +++ b/Mahapps.Metro.Tests/CustomDialogTest.cs @@ -16,7 +16,7 @@ public async Task ReceivesDataContext() var window = await WindowHelpers.CreateInvisibleWindowAsync(); var vm = new TheViewModel(); - var dialog = (SimpleDialog) window.Resources["CustomDialog"]; + var dialog = (CustomDialog) window.Resources["CustomDialog"]; await window.ShowMetroDialogAsync(dialog); diff --git a/Mahapps.Metro.Tests/DialogWindow.xaml b/Mahapps.Metro.Tests/DialogWindow.xaml index f8141cc6cc..b37cd2190a 100644 --- a/Mahapps.Metro.Tests/DialogWindow.xaml +++ b/Mahapps.Metro.Tests/DialogWindow.xaml @@ -8,8 +8,8 @@ mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> - + - + \ No newline at end of file diff --git a/samples/MetroDemo/MainWindow.xaml b/samples/MetroDemo/MainWindow.xaml index 11ffaa40a6..b1194cc99f 100644 --- a/samples/MetroDemo/MainWindow.xaml +++ b/samples/MetroDemo/MainWindow.xaml @@ -64,11 +64,11 @@ Value="{Binding Name, Mode=OneWay}" /> - + x:Name="CustomTestDialog"> - + @@ -154,10 +154,10 @@ Header="Show MessageDialog" /> - + + Header="Show CustomDialog Externally" /> diff --git a/samples/MetroDemo/MainWindow.xaml.cs b/samples/MetroDemo/MainWindow.xaml.cs index 749d37a46f..9a68848334 100644 --- a/samples/MetroDemo/MainWindow.xaml.cs +++ b/samples/MetroDemo/MainWindow.xaml.cs @@ -78,7 +78,7 @@ private void LaunchRibbonDemo(object sender, RoutedEventArgs e) private async void ShowDialogOutside(object sender, RoutedEventArgs e) { - var dialog = (BaseMetroDialog)this.Resources["SimpleDialogTest"]; + var dialog = (BaseMetroDialog)this.Resources["CustomDialogTest"]; dialog = dialog.ShowDialogExternally(); await TaskEx.Delay(5000); @@ -108,11 +108,11 @@ await this.ShowMessageAsync("Result", "You said: " + (result == MessageDialogRes Environment.NewLine + Environment.NewLine + "This dialog will follow the Use Accent setting.")); } - private async void ShowSimpleDialog(object sender, RoutedEventArgs e) + private async void ShowCustomDialog(object sender, RoutedEventArgs e) { this.MetroDialogOptions.ColorScheme = UseAccentForDialogsMenuItem.IsChecked ? MetroDialogColorScheme.Accented : MetroDialogColorScheme.Theme; - var dialog = (BaseMetroDialog)this.Resources["SimpleDialogTest"]; + var dialog = (BaseMetroDialog)this.Resources["CustomDialogTest"]; await this.ShowMetroDialogAsync(dialog);