diff --git a/src/Dialogs/DialogBase.cs b/src/Dialogs/DialogBase.cs
index 9efbc1e..e75a420 100644
--- a/src/Dialogs/DialogBase.cs
+++ b/src/Dialogs/DialogBase.cs
@@ -16,13 +16,26 @@
namespace wpf_material_dialogs.Dialogs
{
+ ///
///
/// Class DialogBase.
- /// Implements the
+ /// Implements the
///
- ///
+ ///
public abstract class DialogBase : IDialog
{
+ #region Events
+
+ ///
+ ///
+ /// Occurs when [property changed].
+ ///
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ #endregion
+
+ #region Fields
+
private readonly object buttonLock = new();
private readonly List buttonTypes = new();
private HorizontalAlignment buttonAlignment = HorizontalAlignment.Right;
@@ -40,6 +53,10 @@ public abstract class DialogBase : IDialog
private FontWeight titleFontWeight = FontWeights.Bold;
private double width = double.NaN;
+ #endregion
+
+ #region Properties
+
///
/// Gets the selected buttons based on the selection.
///
@@ -131,36 +148,6 @@ public DialogButton DialogButtons
}
}
- ///
- /// Gets the buttons.
- ///
- /// The button enum to convert to an IButton.
- /// IButtons.
- /// button
- /// button
- /// button
- public IButtons GetButtons(DialogButton button)
- {
- lock (buttonLock)
- {
- var assembly = Assembly.GetExecutingAssembly();
-
- if (!buttonTypes?.Any() ?? false)
- {
- buttonTypes.AddRange(assembly
- .GetTypes()
- .Where(mytype => mytype.GetInterfaces().Contains(typeof(IButtons))));
- }
-
- var buttons = buttonTypes
- ?.First(mytype => mytype.Name.Equals(button.ToString(), StringComparison.CurrentCultureIgnoreCase));
-
- return buttons?.FullName != null
- ? assembly.CreateInstance(buttons.FullName) as IButtons
- : throw new ArgumentOutOfRangeException(nameof(button));
- }
- }
-
///
/// Gets or sets the icon brush.
///
@@ -189,44 +176,6 @@ public PackIconKind IconKind
}
}
- ///
- /// Notifies the of property changed.
- ///
- /// Name of the property.
- public void NotifyOfPropertyChanged([CallerMemberName] string propertyName = "")
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
-
- ///
- /// Shows the dialog with given configuration.
- ///
- /// The dialog hos identifier.
- /// The opened action.
- /// The closing action.
- /// containing and .
- public async Task ShowDialog(object dialogHosId = null,
- DialogOpenedEventHandler openedAction = null,
- DialogClosingEventHandler closingAction = null)
- {
- return await DialogHost.Show(this, dialogHosId, openedAction, closingAction) as DialogResult? ??
- DialogResult.None;
- }
-
- ///
- /// Shows the dialog with given configuration.
- ///
- /// The dialog hos identifier.
- /// The opened action.
- /// The closing action.
- /// containing and .
- public async Task