1
1
using System . Windows ;
2
+ using System . Windows . Media ;
2
3
3
4
namespace MaterialDesignThemes . Wpf
4
5
{
6
+ public enum CalendarOrientation
7
+ {
8
+ Vertical ,
9
+ Horizontal
10
+ }
5
11
public static class CalendarAssist
6
12
{
13
+ #region Header Visibility
7
14
public static readonly DependencyProperty IsHeaderVisibleProperty = DependencyProperty . RegisterAttached (
8
15
"IsHeaderVisible" , typeof ( bool ) , typeof ( CalendarAssist ) , new PropertyMetadata ( true ) ) ;
9
16
10
- public static void SetIsHeaderVisible ( DependencyObject element , bool value ) => element . SetValue ( IsHeaderVisibleProperty , value ) ;
11
17
public static bool GetIsHeaderVisible ( DependencyObject element ) => ( bool ) element . GetValue ( IsHeaderVisibleProperty ) ;
18
+ public static void SetIsHeaderVisible ( DependencyObject element , bool value ) => element . SetValue ( IsHeaderVisibleProperty , value ) ;
19
+ #endregion
20
+
21
+ #region HeaderBackground
22
+
23
+ public static readonly DependencyProperty HeaderBackgroundProperty = DependencyProperty . RegisterAttached (
24
+ "HeaderBackground" , typeof ( Brush ) , typeof ( CalendarAssist ) , new FrameworkPropertyMetadata ( default ( Brush ) ) ) ;
25
+
26
+ public static Brush GetHeaderBackground ( DependencyObject element ) => ( Brush ) element . GetValue ( HeaderBackgroundProperty ) ;
27
+ public static void SetHeaderBackground ( DependencyObject element , Brush value ) => element . SetValue ( HeaderBackgroundProperty , value ) ;
28
+ #endregion
29
+
30
+ #region HeaderForeground
31
+ public static readonly DependencyProperty HeaderForegroundProperty = DependencyProperty . RegisterAttached (
32
+ "HeaderForeground" , typeof ( Brush ) , typeof ( CalendarAssist ) , new FrameworkPropertyMetadata ( default ( Brush ) ) ) ;
33
+
34
+ public static Brush GetHeaderForeground ( DependencyObject element ) => ( Brush ) element . GetValue ( HeaderForegroundProperty ) ;
35
+ public static void SetHeaderForeground ( DependencyObject element , Brush value ) => element . SetValue ( HeaderForegroundProperty , value ) ;
36
+ #endregion
37
+
38
+ #region SelectionColor
39
+ public static readonly DependencyProperty SelectionColorProperty = DependencyProperty . RegisterAttached (
40
+ "SelectionColor" , typeof ( Brush ) , typeof ( CalendarAssist ) , new FrameworkPropertyMetadata ( default ( Brush ) ) ) ;
41
+
42
+ public static Brush GetSelectionColor ( DependencyObject element ) => ( Brush ) element . GetValue ( SelectionColorProperty ) ;
43
+ public static void SetSelectionColor ( DependencyObject element , Brush value ) => element . SetValue ( SelectionColorProperty , value ) ;
44
+ #endregion
45
+
46
+ #region SelectionForegroundColor
47
+ public static readonly DependencyProperty SelectionForegroundColorProperty = DependencyProperty . RegisterAttached (
48
+ "SelectionForegroundColor" , typeof ( Brush ) , typeof ( CalendarAssist ) , new FrameworkPropertyMetadata ( default ( Brush ) ) ) ;
49
+
50
+ public static Brush GetSelectionForegroundColor ( DependencyObject element ) => ( Brush ) element . GetValue ( SelectionForegroundColorProperty ) ;
51
+ public static void SetSelectionForegroundColor ( DependencyObject element , Brush value ) => element . SetValue ( SelectionForegroundColorProperty , value ) ;
52
+ #endregion
53
+
54
+ #region Orientation
55
+ public static readonly DependencyProperty OrientationProperty = DependencyProperty . RegisterAttached (
56
+ "Orientation" , typeof ( CalendarOrientation ) , typeof ( CalendarAssist ) , new FrameworkPropertyMetadata ( default ( CalendarOrientation ) ) ) ;
57
+
58
+ public static CalendarOrientation GetOrientation ( DependencyObject element ) => ( CalendarOrientation ) element . GetValue ( OrientationProperty ) ;
59
+ public static void SetOrientation ( DependencyObject element , CalendarOrientation value ) => element . SetValue ( OrientationProperty , value ) ;
60
+ #endregion
12
61
}
13
62
}
0 commit comments