@@ -150,39 +150,76 @@ public static void SetHeaderMargin(UIElement element, Thickness value)
150
150
element . SetValue ( HeaderMarginProperty , value ) ;
151
151
}
152
152
153
- public static readonly DependencyProperty FocusBorderBrushProperty = DependencyProperty . RegisterAttached ( "FocusBorderBrush" , typeof ( Brush ) , typeof ( ControlsHelper ) , new FrameworkPropertyMetadata ( Brushes . Transparent , FrameworkPropertyMetadataOptions . AffectsRender | FrameworkPropertyMetadataOptions . Inherits ) ) ;
154
- public static readonly DependencyProperty MouseOverBorderBrushProperty = DependencyProperty . RegisterAttached ( "MouseOverBorderBrush" , typeof ( Brush ) , typeof ( ControlsHelper ) , new FrameworkPropertyMetadata ( Brushes . Transparent , FrameworkPropertyMetadataOptions . AffectsRender | FrameworkPropertyMetadataOptions . Inherits ) ) ;
153
+ public static readonly DependencyProperty FocusBorderBrushProperty
154
+ = DependencyProperty . RegisterAttached ( "FocusBorderBrush" ,
155
+ typeof ( Brush ) ,
156
+ typeof ( ControlsHelper ) ,
157
+ new FrameworkPropertyMetadata ( Brushes . Transparent , FrameworkPropertyMetadataOptions . AffectsRender | FrameworkPropertyMetadataOptions . Inherits ) ) ;
158
+
159
+ /// <summary>
160
+ /// Gets the brush used to draw the focus border.
161
+ /// </summary>
162
+ [ Category ( AppName . MahApps ) ]
163
+ [ AttachedPropertyBrowsableForType ( typeof ( TextBox ) ) ]
164
+ [ AttachedPropertyBrowsableForType ( typeof ( DatePicker ) ) ]
165
+ [ AttachedPropertyBrowsableForType ( typeof ( ComboBox ) ) ]
166
+ [ AttachedPropertyBrowsableForType ( typeof ( ButtonBase ) ) ]
167
+ public static Brush GetFocusBorderBrush ( DependencyObject obj )
168
+ {
169
+ return ( Brush ) obj . GetValue ( FocusBorderBrushProperty ) ;
170
+ }
155
171
156
172
/// <summary>
157
173
/// Sets the brush used to draw the focus border.
158
174
/// </summary>
175
+ [ Category ( AppName . MahApps ) ]
176
+ [ AttachedPropertyBrowsableForType ( typeof ( TextBox ) ) ]
177
+ [ AttachedPropertyBrowsableForType ( typeof ( DatePicker ) ) ]
178
+ [ AttachedPropertyBrowsableForType ( typeof ( ComboBox ) ) ]
179
+ [ AttachedPropertyBrowsableForType ( typeof ( ButtonBase ) ) ]
159
180
public static void SetFocusBorderBrush ( DependencyObject obj , Brush value )
160
181
{
161
182
obj . SetValue ( FocusBorderBrushProperty , value ) ;
162
183
}
163
184
185
+ public static readonly DependencyProperty FocusBorderThicknessProperty
186
+ = DependencyProperty . RegisterAttached ( "FocusBorderThickness" ,
187
+ typeof ( Thickness ) ,
188
+ typeof ( ControlsHelper ) ,
189
+ new FrameworkPropertyMetadata ( default ( Thickness ) , FrameworkPropertyMetadataOptions . AffectsRender | FrameworkPropertyMetadataOptions . Inherits ) ) ;
190
+
164
191
/// <summary>
165
192
/// Gets the brush used to draw the focus border.
166
193
/// </summary>
167
194
[ Category ( AppName . MahApps ) ]
168
195
[ AttachedPropertyBrowsableForType ( typeof ( TextBox ) ) ]
169
- [ AttachedPropertyBrowsableForType ( typeof ( CheckBox ) ) ]
170
- [ AttachedPropertyBrowsableForType ( typeof ( RadioButton ) ) ]
171
196
[ AttachedPropertyBrowsableForType ( typeof ( DatePicker ) ) ]
172
197
[ AttachedPropertyBrowsableForType ( typeof ( ComboBox ) ) ]
173
- public static Brush GetFocusBorderBrush ( DependencyObject obj )
198
+ [ AttachedPropertyBrowsableForType ( typeof ( ButtonBase ) ) ]
199
+ public static Thickness GetFocusBorderThickness ( DependencyObject obj )
174
200
{
175
- return ( Brush ) obj . GetValue ( FocusBorderBrushProperty ) ;
201
+ return ( Thickness ) obj . GetValue ( FocusBorderThicknessProperty ) ;
176
202
}
177
203
178
204
/// <summary>
179
- /// Sets the brush used to draw the mouse over brush .
205
+ /// Sets the brush used to draw the focus border .
180
206
/// </summary>
181
- public static void SetMouseOverBorderBrush ( DependencyObject obj , Brush value )
207
+ [ Category ( AppName . MahApps ) ]
208
+ [ AttachedPropertyBrowsableForType ( typeof ( TextBox ) ) ]
209
+ [ AttachedPropertyBrowsableForType ( typeof ( DatePicker ) ) ]
210
+ [ AttachedPropertyBrowsableForType ( typeof ( ComboBox ) ) ]
211
+ [ AttachedPropertyBrowsableForType ( typeof ( ButtonBase ) ) ]
212
+ public static void SetFocusBorderThickness ( DependencyObject obj , Thickness value )
182
213
{
183
- obj . SetValue ( MouseOverBorderBrushProperty , value ) ;
214
+ obj . SetValue ( FocusBorderThicknessProperty , value ) ;
184
215
}
185
216
217
+ public static readonly DependencyProperty MouseOverBorderBrushProperty
218
+ = DependencyProperty . RegisterAttached ( "MouseOverBorderBrush" ,
219
+ typeof ( Brush ) ,
220
+ typeof ( ControlsHelper ) ,
221
+ new FrameworkPropertyMetadata ( Brushes . Transparent , FrameworkPropertyMetadataOptions . AffectsRender | FrameworkPropertyMetadataOptions . Inherits ) ) ;
222
+
186
223
/// <summary>
187
224
/// Gets the brush used to draw the mouse over brush.
188
225
/// </summary>
@@ -198,6 +235,21 @@ public static Brush GetMouseOverBorderBrush(DependencyObject obj)
198
235
return ( Brush ) obj . GetValue ( MouseOverBorderBrushProperty ) ;
199
236
}
200
237
238
+ /// <summary>
239
+ /// Sets the brush used to draw the mouse over brush.
240
+ /// </summary>
241
+ [ Category ( AppName . MahApps ) ]
242
+ [ AttachedPropertyBrowsableForType ( typeof ( TextBox ) ) ]
243
+ [ AttachedPropertyBrowsableForType ( typeof ( CheckBox ) ) ]
244
+ [ AttachedPropertyBrowsableForType ( typeof ( RadioButton ) ) ]
245
+ [ AttachedPropertyBrowsableForType ( typeof ( DatePicker ) ) ]
246
+ [ AttachedPropertyBrowsableForType ( typeof ( ComboBox ) ) ]
247
+ [ AttachedPropertyBrowsableForType ( typeof ( Tile ) ) ]
248
+ public static void SetMouseOverBorderBrush ( DependencyObject obj , Brush value )
249
+ {
250
+ obj . SetValue ( MouseOverBorderBrushProperty , value ) ;
251
+ }
252
+
201
253
/// <summary>
202
254
/// DependencyProperty for <see cref="CornerRadius" /> property.
203
255
/// </summary>
0 commit comments