redesign to material standards and clean up some sylings

This commit is contained in:
Rene Schwarz
2021-04-08 03:31:21 +02:00
parent 73f864ea20
commit ca432897af
78 changed files with 1904 additions and 309 deletions

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows;
using System.Windows.Controls;
namespace Server_Dashboard {
@@ -22,22 +19,10 @@ namespace Server_Dashboard {
HasTextProperty.SetValue((PasswordBox)sender);
}
}
public class HasTextProperty : BaseAttachedProperty<HasTextProperty, bool> {
public static void SetValue(DependencyObject sender) {
SetValue(sender, ((PasswordBox)sender).SecurePassword.Length < 1);
}
}
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();
};
}
};
}
}
}
}