Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed SimpleDialog to CustomDialog #1613

Merged
merged 1 commit into from
Oct 28, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MahApps.Metro/Controls/Dialogs/BaseMetroDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <see cref="SimpleDialog"/> class.
/// use the <see cref="CustomDialog"/> class.
/// </summary>
public abstract class BaseMetroDialog : ContentControl
{
Expand Down
8 changes: 8 additions & 0 deletions MahApps.Metro/Controls/Dialogs/CustomDialog.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace MahApps.Metro.Controls.Dialogs
{
/// <summary>
/// An implementation of BaseMetroDialog allowing arbitrary content.
/// </summary>
public class CustomDialog : BaseMetroDialog
{ }
}
15 changes: 0 additions & 15 deletions MahApps.Metro/Controls/Dialogs/SimpleDialog.cs

This file was deleted.

2 changes: 1 addition & 1 deletion MahApps.Metro/MahApps.Metro.NET45.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@
<Compile Include="Controls\CustomValidationPopup.cs" />
<Compile Include="Controls\DataGridNumericUpDownColumn.cs" />
<Compile Include="Controls\Dialogs\BaseMetroDialog.cs" />
<Compile Include="Controls\Dialogs\CustomDialog.cs" />
<Compile Include="Controls\Dialogs\DialogManager.cs" />
<Compile Include="Controls\Dialogs\DialogStateChangedEventArgs.cs" />
<Compile Include="Controls\Dialogs\InputDialog.cs" />
<Compile Include="Controls\Dialogs\LoginDialog.cs" />
<Compile Include="Controls\Dialogs\MessageDialog.cs" />
<Compile Include="Controls\Dialogs\ProgressDialog.cs" />
<Compile Include="Controls\Dialogs\ProgressDialogController.cs" />
<Compile Include="Controls\Dialogs\SimpleDialog.cs" />
<Compile Include="Controls\DropDownButton.cs" />
<Compile Include="Controls\FlipView.cs" />
<Compile Include="Controls\Flyout.cs" />
Expand Down
2 changes: 1 addition & 1 deletion MahApps.Metro/MahApps.Metro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<Compile Include="Controls\Dialogs\LoginDialog.cs" />
<Compile Include="Controls\Dialogs\ProgressDialog.cs" />
<Compile Include="Controls\Dialogs\ProgressDialogController.cs" />
<Compile Include="Controls\Dialogs\SimpleDialog.cs" />
<Compile Include="Controls\Dialogs\CustomDialog.cs" />
<Compile Include="Controls\DropDownButton.cs" />
<Compile Include="Controls\FlipView.cs" />
<Compile Include="Controls\Flyout.cs" />
Expand Down
2 changes: 1 addition & 1 deletion Mahapps.Metro.Tests/CustomDialogTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public async Task ReceivesDataContext()

var window = await WindowHelpers.CreateInvisibleWindowAsync<DialogWindow>();
var vm = new TheViewModel();
var dialog = (SimpleDialog) window.Resources["CustomDialog"];
var dialog = (CustomDialog) window.Resources["CustomDialog"];

await window.ShowMetroDialogAsync(dialog);

Expand Down
4 changes: 2 additions & 2 deletions Mahapps.Metro.Tests/DialogWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<controls:MetroWindow.Resources>
<dialogs:SimpleDialog x:Key="CustomDialog">
<dialogs:CustomDialog x:Key="CustomDialog">
<TextBlock x:Name="TheDialogBody" Text="{Binding Path=Text}" />
</dialogs:SimpleDialog>
</dialogs:CustomDialog>
</controls:MetroWindow.Resources>
</controls:MetroWindow>
12 changes: 6 additions & 6 deletions samples/MetroDemo/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
Value="{Binding Name, Mode=OneWay}" />
</Style>

<Dialog:SimpleDialog x:Key="SimpleDialogTest"
<Dialog:CustomDialog x:Key="CustomDialogTest"
Title="This dialog allows arbitrary content. It will close in 5 seconds."
x:Name="SimpleTestDialog">
x:Name="CustomTestDialog">
<TextBlock Height="30" Text="{Binding Artists[0].Name}" Foreground="{DynamicResource AccentBrush}" />
</Dialog:SimpleDialog>
</Dialog:CustomDialog>

</ResourceDictionary>
</Window.Resources>
Expand Down Expand Up @@ -154,10 +154,10 @@
Header="Show MessageDialog" />
<MenuItem Click="ShowProgressDialog"
Header="Show ProgressDialog" />
<MenuItem Click="ShowSimpleDialog"
Header="Show SimpleDialog" />
<MenuItem Click="ShowCustomDialog"
Header="Show CustomDialog" />
<MenuItem Click="ShowDialogOutside"
Header="Show SimpleDialog Externally" />
Header="Show CustomDialog Externally" />
</MenuItem>
<MenuItem Header="Window">
<MenuItem IsCheckable="True" Header="Ignore taskbar on maximize" Click="IgnoreTaskBar_Click"/>
Expand Down
6 changes: 3 additions & 3 deletions samples/MetroDemo/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down