Hi,
You would be able to extend the Customizable Window Properties by modifying the Interactivity project from the Prism Library.
Both properties you mentioned may be configured from the corresponding InteractionRequestViewModel raise methods according to each popup view desire Style. In order to accomplish this, you would need to implement the desired Properties into the INotification (and also Notification) class, and generate the Bindings into them from the DefaultNotificationWindow.xaml class. You could also extend more Window properties in the same way than these ones described.
The following code shows how the CustomPopupView would have the Maximize and Minimize buttons disabled. And the DefaultNotification popup would have configured not to be shown in the TaskBar:
I hope this helped,
Regards.
Gabriel Ostrowsky
https://blogs.southworks.net/gostrowsky
You would be able to extend the Customizable Window Properties by modifying the Interactivity project from the Prism Library.
Both properties you mentioned may be configured from the corresponding InteractionRequestViewModel raise methods according to each popup view desire Style. In order to accomplish this, you would need to implement the desired Properties into the INotification (and also Notification) class, and generate the Bindings into them from the DefaultNotificationWindow.xaml class. You could also extend more Window properties in the same way than these ones described.
The following code shows how the CustomPopupView would have the Maximize and Minimize buttons disabled. And the DefaultNotification popup would have configured not to be shown in the TaskBar:
InteractionRequestViewModel.cs ... privatevoid RaiseCustomPopupView() { // In this case we are passing a simple notification as a parameter.// The custom popup view we are using for this interaction request does not have a DataContext of its own// so it will inherit the DataContext of the window, which will be this same notification.this.InteractionResultMessage = ""; this.CustomPopupViewRequest.Raise( new Notification { Content = "Message for the CustomPopupView", Title = "Custom Popup", ResizeMode = ResizeMode.NoResize, TaskBar = true }); } ... privatevoid RaiseNotification() { // By invoking the Raise method we are raising the Raised event and triggering any InteractionRequestTrigger that// is subscribed to it.// As parameters we are passing a Notification, which is a default implementation of INotification provided by Prism// and a callback that is executed when the interaction finishes.this.NotificationRequest.Raise( new Notification { Content = "Notification Message", Title = "Notification", ResizeMode = ResizeMode.CanResize, TaskBar = false }, n => { InteractionResultMessage = "The user was notified."; }); }
publicinterface INotification { ///<summary>/// Gets or sets the title to use for the notification.///</summary>string Title { get; set; } ///<summary>/// Gets or sets the content of the notification.///</summary>object Content { get; set; } ///<summary>/// Gets or sets the resize mode of the notification window.///</summary> System.Windows.ResizeMode ResizeMode { get; set; } ///<summary>/// Gets or sets the a boolean for being the Notification Window visible on the task bar.///</summary>bool TaskBar { get; set; } }
Regards.
Gabriel Ostrowsky
https://blogs.southworks.net/gostrowsky