Automated dotnet-format update
This commit is contained in:
1 parent
30bf4f358a
commit
ffdc45765a
1 file changed
+3
-3
@@ -64,14 +64,14 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register(
|
||||||
"Maximum", typeof(int), typeof(Badge), new PropertyMetadata(ValueBoxes.Int99Box, OnMaximumChanged));
|
"Maximum", typeof(int), typeof(Badge), new PropertyMetadata(ValueBoxes.Int99Box, OnMaximumChanged));
|
||||||
|
|
||||||
private static void OnMaximumChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnMaximumChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var ctl = (Badge) d;
|
var ctl = (Badge) d;
|
||||||
var v = ctl.Value;
|
var v = ctl.Value;
|
||||||
ctl.SetCurrentValue(TextProperty, v <= ctl.Maximum ? v.ToString() : $"{ctl.Maximum}+");
|
ctl.SetCurrentValue(TextProperty, v <= ctl.Maximum ? v.ToString() : $"{ctl.Maximum}+");
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Maximum
|
public int Maximum
|
||||||
{
|
{
|
||||||
get => (int) GetValue(MaximumProperty);
|
get => (int) GetValue(MaximumProperty);
|
||||||
|
|||||||
Reference in new issue
Block a user