diff --git a/src/MahApps.Metro.Samples/MahApps.Metro.Demo/MainWindow.xaml b/src/MahApps.Metro.Samples/MahApps.Metro.Demo/MainWindow.xaml index 84a25b077a..ba692b2041 100644 --- a/src/MahApps.Metro.Samples/MahApps.Metro.Demo/MainWindow.xaml +++ b/src/MahApps.Metro.Samples/MahApps.Metro.Demo/MainWindow.xaml @@ -1,13 +1,13 @@  + IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type mah:MetroWindow}}, Path=DWMSupportsBorderColor}" + IsEnabled="False" /> Identifies the dependency property. public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(nameof(Title), - typeof(string), + typeof(object), typeof(BaseMetroDialog), - new PropertyMetadata(default(string))); + new PropertyMetadata(default(object))); /// /// Gets or sets the title of the dialog. /// - public string? Title + public object? Title { - get => (string?)this.GetValue(TitleProperty); + get => (object?)this.GetValue(TitleProperty); set => this.SetValue(TitleProperty, value); } diff --git a/src/MahApps.Metro/Controls/Dialogs/DialogManager.cs b/src/MahApps.Metro/Controls/Dialogs/DialogManager.cs index 8b4e477a99..b1fb2a1287 100644 --- a/src/MahApps.Metro/Controls/Dialogs/DialogManager.cs +++ b/src/MahApps.Metro/Controls/Dialogs/DialogManager.cs @@ -24,7 +24,7 @@ public static class DialogManager /// The message contained within the LoginDialog. /// Optional settings that override the global metro dialog settings. /// The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. - public static async Task ShowLoginAsync(this MetroWindow window, string title, string message, LoginDialogSettings? settings = null) + public static async Task ShowLoginAsync(this MetroWindow window, object title, string message, LoginDialogSettings? settings = null) { window.Dispatcher.VerifyAccess(); @@ -73,7 +73,7 @@ public static class DialogManager /// The message contained within the MessageDialog. /// Optional settings that override the global metro dialog settings. /// The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. - public static async Task ShowInputAsync(this MetroWindow window, string title, string message, MetroDialogSettings? settings = null) + public static async Task ShowInputAsync(this MetroWindow window, object title, string message, MetroDialogSettings? settings = null) { window.Dispatcher.VerifyAccess(); @@ -124,7 +124,7 @@ public static class DialogManager /// The type of buttons to use. /// Optional settings that override the global metro dialog settings. /// A task promising the result of which button was pressed. - public static async Task ShowMessageAsync(this MetroWindow window, string title, string message, MessageDialogStyle style = MessageDialogStyle.Affirmative, MetroDialogSettings? settings = null) + public static async Task ShowMessageAsync(this MetroWindow window, object title, string message, MessageDialogStyle style = MessageDialogStyle.Affirmative, MetroDialogSettings? settings = null) { window.Dispatcher.VerifyAccess(); @@ -175,7 +175,7 @@ public static async Task ShowMessageAsync(this MetroWindow /// Determines if the cancel button is visible. /// Optional Settings that override the global metro dialog settings. /// A task promising the instance of ProgressDialogController for this operation. - public static async Task ShowProgressAsync(this MetroWindow window, string title, string message, bool isCancelable = false, MetroDialogSettings? settings = null) + public static async Task ShowProgressAsync(this MetroWindow window, object title, string message, bool isCancelable = false, MetroDialogSettings? settings = null) { window.Dispatcher.VerifyAccess(); diff --git a/src/MahApps.Metro/Controls/Dialogs/ProgressDialogController.cs b/src/MahApps.Metro/Controls/Dialogs/ProgressDialogController.cs index 59c54d6eb5..7635780cd8 100644 --- a/src/MahApps.Metro/Controls/Dialogs/ProgressDialogController.cs +++ b/src/MahApps.Metro/Controls/Dialogs/ProgressDialogController.cs @@ -147,7 +147,7 @@ public void SetMessage(string message) /// Sets the dialog's title. /// /// The title to be set. - public void SetTitle(string title) + public void SetTitle(object title) { this.WrappedDialog.Invoke(() => this.WrappedDialog.Title = title); } diff --git a/src/MahApps.Metro/Styles/Controls.Buttons.xaml b/src/MahApps.Metro/Styles/Controls.Buttons.xaml index 9dd9d9ee39..1b6eb7a602 100644 --- a/src/MahApps.Metro/Styles/Controls.Buttons.xaml +++ b/src/MahApps.Metro/Styles/Controls.Buttons.xaml @@ -1,8 +1,8 @@  + xmlns:mahConverters="clr-namespace:MahApps.Metro.Converters"> diff --git a/src/MahApps.Metro/Themes/Dialogs/BaseMetroDialog.xaml b/src/MahApps.Metro/Themes/Dialogs/BaseMetroDialog.xaml index ff67650b4e..da3f4502f0 100644 --- a/src/MahApps.Metro/Themes/Dialogs/BaseMetroDialog.xaml +++ b/src/MahApps.Metro/Themes/Dialogs/BaseMetroDialog.xaml @@ -79,13 +79,18 @@ - + + + + + @@ -204,10 +204,10 @@ + Visibility="Collapsed" /> @@ -299,9 +299,9 @@ HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Panel.ZIndex="1" + controlzEx:WindowChrome.IsHitTestVisibleInChrome="True" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}" - controlzEx:WindowChrome.IsHitTestVisibleInChrome="True" Focusable="False" Visibility="{TemplateBinding ShowIconOnTitleBar, Converter={StaticResource BooleanToVisibilityConverter}}" /> @@ -456,10 +456,10 @@ + Visibility="Collapsed" /> diff --git a/src/MahApps.Metro/Themes/WindowButtonCommands.xaml b/src/MahApps.Metro/Themes/WindowButtonCommands.xaml index 28d075588d..f740a07d96 100644 --- a/src/MahApps.Metro/Themes/WindowButtonCommands.xaml +++ b/src/MahApps.Metro/Themes/WindowButtonCommands.xaml @@ -1,18 +1,18 @@  + xmlns:mahConverters="clr-namespace:MahApps.Metro.Converters">