1- namespace MaterialDesignThemes . Wpf ;
1+ using System . Windows . Media ;
2+
3+ namespace MaterialDesignThemes . Wpf ;
24
35public static class ListBoxItemAssist
46{
57
6- private static readonly CornerRadius DefaultCornerRadius = new CornerRadius ( 2.0 ) ;
8+ private static readonly CornerRadius DefaultCornerRadius = new ( 2.0 ) ;
79
810 #region AttachedProperty : CornerRadiusProperty
911 /// <summary>
@@ -17,6 +19,39 @@ public static CornerRadius GetCornerRadius(DependencyObject element)
1719 public static void SetCornerRadius ( DependencyObject element , CornerRadius value ) => element . SetValue ( CornerRadiusProperty , value ) ;
1820 #endregion
1921
22+ #region HoverBackground
23+ public static Brush ? GetHoverBackground ( DependencyObject obj )
24+ => ( Brush ? ) obj . GetValue ( HoverBackgroundProperty ) ;
25+
26+ public static void SetHoverBackground ( DependencyObject obj , Brush ? value )
27+ => obj . SetValue ( HoverBackgroundProperty , value ) ;
28+
29+ public static readonly DependencyProperty HoverBackgroundProperty =
30+ DependencyProperty . RegisterAttached ( "HoverBackground" , typeof ( Brush ) , typeof ( ListBoxItemAssist ) , new PropertyMetadata ( null ) ) ;
31+ #endregion HoverBackground
32+
33+ #region SelectedFocusedBackground
34+ public static Brush ? GetSelectedFocusedBackground ( DependencyObject obj )
35+ => ( Brush ? ) obj . GetValue ( SelectedFocusedBackgroundProperty ) ;
36+
37+ public static void SetSelectedFocusedBackground ( DependencyObject obj , Brush ? value )
38+ => obj . SetValue ( SelectedFocusedBackgroundProperty , value ) ;
39+
40+ public static readonly DependencyProperty SelectedFocusedBackgroundProperty =
41+ DependencyProperty . RegisterAttached ( "SelectedFocusedBackground" , typeof ( Brush ) , typeof ( ListBoxItemAssist ) , new PropertyMetadata ( null ) ) ;
42+ #endregion SelectedFocusedBackground
43+
44+ #region SelectedUnfocusedBackground
45+ public static Brush ? GetSelectedUnfocusedBackground ( DependencyObject obj )
46+ => ( Brush ? ) obj . GetValue ( SelectedUnfocusedBackgroundProperty ) ;
47+
48+ public static void SetSelectedUnfocusedBackground ( DependencyObject obj , Brush ? value )
49+ => obj . SetValue ( SelectedUnfocusedBackgroundProperty , value ) ;
50+
51+ public static readonly DependencyProperty SelectedUnfocusedBackgroundProperty =
52+ DependencyProperty . RegisterAttached ( "SelectedUnfocusedBackground" , typeof ( Brush ) , typeof ( ListBoxItemAssist ) , new PropertyMetadata ( null ) ) ;
53+ #endregion SelectedFocusedBackground
54+
2055 #region ShowSelection
2156 public static bool GetShowSelection ( DependencyObject element )
2257 => ( bool ) element . GetValue ( ShowSelectionProperty ) ;
0 commit comments