-
Notifications
You must be signed in to change notification settings - Fork 0
/
SegmentedCircularProgressBar.xaml.vb
134 lines (101 loc) · 5.06 KB
/
SegmentedCircularProgressBar.xaml.vb
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Media
Namespace CircularProgressBar.Controls
Public Partial Class SegmentedCircularProgressBar
Inherits UserControl
Public Sub New()
Me.InitializeComponent()
End Sub
Public Property MinValue As Double
Get
Return CDbl(GetValue(MinValueProperty))
End Get
Set(ByVal value As Double)
SetValue(MinValueProperty, value)
End Set
End Property
Public Shared ReadOnly MinValueProperty As DependencyProperty = DependencyProperty.Register("MinValue", GetType(Double), GetType(SegmentedCircularProgressBar), New PropertyMetadata(0R))
Public Property MaxValue As Double
Get
Return CDbl(GetValue(MaxValueProperty))
End Get
Set(ByVal value As Double)
SetValue(MaxValueProperty, value)
End Set
End Property
Public Shared ReadOnly MaxValueProperty As DependencyProperty = DependencyProperty.Register("MaxValue", GetType(Double), GetType(SegmentedCircularProgressBar), New PropertyMetadata(100R))
Public Property Value As Double
Get
Return CDbl(GetValue(ValueProperty))
End Get
Set(ByVal value As Double)
SetValue(ValueProperty, value)
End Set
End Property
Public Shared ReadOnly ValueProperty As DependencyProperty = DependencyProperty.Register("Value", GetType(Double), GetType(SegmentedCircularProgressBar), New PropertyMetadata(0R))
Public Property Thickness As Integer
Get
Return CInt(GetValue(ThicknessProperty))
End Get
Set(ByVal value As Integer)
SetValue(ThicknessProperty, value)
End Set
End Property
Public Shared ReadOnly ThicknessProperty As DependencyProperty = DependencyProperty.Register("Thickness", GetType(Integer), GetType(SegmentedCircularProgressBar), New PropertyMetadata(15))
Public Property ProgressThickness As Integer
Get
Return CInt(GetValue(ProgressThicknessProperty))
End Get
Set(ByVal value As Integer)
SetValue(ProgressThicknessProperty, value)
End Set
End Property
Public Shared ReadOnly ProgressThicknessProperty As DependencyProperty = DependencyProperty.Register("ProgressThickness", GetType(Integer), GetType(SegmentedCircularProgressBar), New PropertyMetadata(15))
Public Property TextBrush As Brush
Get
Return CType(GetValue(TextBrushProperty), Brush)
End Get
Set(ByVal value As Brush)
SetValue(TextBrushProperty, value)
End Set
End Property
Public Shared ReadOnly TextBrushProperty As DependencyProperty = DependencyProperty.Register("TextBrush", GetType(Brush), GetType(SegmentedCircularProgressBar), New PropertyMetadata(Brushes.DeepSkyBlue))
Public Property Segment1Brush As Brush
Get
Return CType(GetValue(Segment1BrushProperty), Brush)
End Get
Set(ByVal value As Brush)
SetValue(Segment1BrushProperty, value)
End Set
End Property
Public Shared ReadOnly Segment1BrushProperty As DependencyProperty = DependencyProperty.Register("Segment1Brush", GetType(Brush), GetType(SegmentedCircularProgressBar), New PropertyMetadata(Brushes.Coral))
Public Property Segment2Brush As Brush
Get
Return CType(GetValue(Segment2BrushProperty), Brush)
End Get
Set(ByVal value As Brush)
SetValue(Segment2BrushProperty, value)
End Set
End Property
Public Shared ReadOnly Segment2BrushProperty As DependencyProperty = DependencyProperty.Register("Segment2Brush", GetType(Brush), GetType(SegmentedCircularProgressBar), New PropertyMetadata(Brushes.LightCoral))
Public Property Segment3Brush As Brush
Get
Return CType(GetValue(Segment3BrushProperty), Brush)
End Get
Set(ByVal value As Brush)
SetValue(Segment3BrushProperty, value)
End Set
End Property
Public Shared ReadOnly Segment3BrushProperty As DependencyProperty = DependencyProperty.Register("Segment3Brush", GetType(Brush), GetType(SegmentedCircularProgressBar), New PropertyMetadata(Brushes.Gold))
Public Property Segment4Brush As Brush
Get
Return CType(GetValue(Segment4BrushProperty), Brush)
End Get
Set(ByVal value As Brush)
SetValue(Segment4BrushProperty, value)
End Set
End Property
Public Shared ReadOnly Segment4BrushProperty As DependencyProperty = DependencyProperty.Register("Segment4Brush", GetType(Brush), GetType(SegmentedCircularProgressBar), New PropertyMetadata(Brushes.LightGreen))
End Class
End Namespace