redesign to material standards and clean up some sylings
This commit is contained in:
17
Server Dashboard/AttachedProperty/WindowProperties.cs
Normal file
17
Server Dashboard/AttachedProperty/WindowProperties.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
public class CloseProperty : BaseAttachedProperty<CloseProperty, bool> {
|
||||
public override void OnValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) {
|
||||
if (sender is Window window) {
|
||||
window.Loaded += (s, e) => {
|
||||
if (window.DataContext is IWindowHelper wh) {
|
||||
wh.Close += () => {
|
||||
window.Close();
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user