I have implemented the new DialogService as shown in this issue A New IDialogService for WPF
However, this doesn't explain how to edit the window of the dialog itself, since the NotificationDialog is a UserControl.
I have tried changing it to a Window but then an exception is raised due to not being the root Window.
Any idea how can I change the Window of the dialog?
Since the Title and the Icon is set in DialogViewModelBase, I have tried to add a ResizeMode property as well.
In DialogViewModelBase:
private ResizeMode _resizeMode;
public ResizeMode ResizeMode
{
get => _resizeMode;
set => SetProperty(ref _resizeMode, value);
}
and in NotificationDialogViewModel implementation:
public NotificationDialogViewModel()
{
Title = "Notification";
ResizeMode = System.Windows.ResizeMode.CanMinimize;
CloseDialogCommand = new DelegateCommand(CloseDialog);
}
However it doesn't work as intended.