style<IconButton>: add IconButton.IconSize to control size of icon

This commit is contained in:
leo 2022-11-04 12:48:41 +08:00
parent 785b2c1f82
commit 4cd07d90a5
12 changed files with 50 additions and 35 deletions

View file

@ -1,3 +1,4 @@
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
@ -20,6 +21,17 @@ namespace SourceGit.Views.Controls {
set { SetValue(IconProperty, value); }
}
public static readonly DependencyProperty IconSizeProperty = DependencyProperty.Register(
"IconSize",
typeof(double),
typeof(IconButton),
new PropertyMetadata(14.0));
public double IconSize {
get { return (double)GetValue(IconSizeProperty); }
set { SetValue(IconSizeProperty, value); }
}
public static readonly DependencyProperty HoverBackgroundProperty = DependencyProperty.Register(
"HoverBackground",
typeof(Brush),