1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48:
| using System.Windows; using System.Windows.Controls; using System.Windows.Media;
namespace Program.GUI.Controls { public partial class FlatButton : Button { public static readonly DependencyProperty HoverBackgroundProperty = DependencyProperty.Register( "HoverBackground", typeof(Brush), typeof(FlatButton) );
public static readonly DependencyProperty HoverForegroundProperty = DependencyProperty.Register( "HoverForeground", typeof(Brush), typeof(FlatButton) );
public static readonly DependencyProperty ClickBackgroundProperty = DependencyProperty.Register( "ClickBackground", typeof(Brush), typeof(FlatButton) );
public static readonly DependencyProperty ClickForegroundProperty = DependencyProperty.Register( "ClickForeground", typeof(Brush), typeof(FlatButton) );
public Brush HoverBackground { get; set; } public Brush HoverForeground { get; set; }
public Brush ClickBackground { get; set; } public Brush ClickForeground { get; set; }
static FlatButton() { DefaultStyleKeyProperty.OverrideMetadata(typeof(FlatButton), new FrameworkPropertyMetadata(typeof(FlatButton))); }
public FlatButton() { this.InitializeComponent(); } } } |