forked from MaterialDesignInXAML/MaterialDesignInXamlToolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColorZone.cs
More file actions
48 lines (42 loc) · 1.49 KB
/
Copy pathColorZone.cs
File metadata and controls
48 lines (42 loc) · 1.49 KB
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 MaterialDesignThemes.Wpf
{
public enum ColorZoneMode
{
Standard,
Inverted,
PrimaryLight,
PrimaryMid,
PrimaryDark,
Accent,
Light,
Dark,
Custom
}
/// <summary>
/// User a colour zone to easily switch the background and foreground colours, from selected Material Design palette or custom ones.
/// </summary>
public class ColorZone : ContentControl
{
static ColorZone()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(ColorZone), new FrameworkPropertyMetadata(typeof(ColorZone)));
}
public static readonly DependencyProperty ModeProperty = DependencyProperty.Register(
nameof(Mode), typeof(ColorZoneMode), typeof(ColorZone), new PropertyMetadata(default(ColorZoneMode)));
public ColorZoneMode Mode
{
get { return (ColorZoneMode)GetValue(ModeProperty); }
set { SetValue(ModeProperty, value); }
}
public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register(
nameof(CornerRadius), typeof(CornerRadius), typeof(ColorZone), new PropertyMetadata(default(CornerRadius)));
public CornerRadius CornerRadius
{
get { return (CornerRadius)GetValue(CornerRadiusProperty); }
set { SetValue(CornerRadiusProperty, value); }
}
}
}