chr
2024-03-05 58814389fac0ecf0f12e2509f3bf522082ed9f0f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System.Windows.Media;
using System.Windows;
using System.Windows.Controls;
 
namespace WPFProject.Controls
{
    public class DpPlugin
    {
        public static Brush GetHoverColor(Button button)
        {
            return (Brush)button.GetValue(HoverColorProperty);
        }
 
        public static void SetHoverColor(Button button, Brush value)
        {
            button.SetValue(HoverColorProperty, value);
        }
 
        public static readonly DependencyProperty HoverColorProperty = DependencyProperty.RegisterAttached("HoverColor", typeof(Brush), typeof(DpPlugin),
            new PropertyMetadata(new SolidColorBrush(Color.FromRgb(255, 255, 255))));
    }
}