close #604
This commit is contained in:
1 parent
42734d8bd7
commit
f069b5236d
1 file changed
+2
-2
@@ -22,7 +22,7 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
|
||||
"Text", typeof(string), typeof(Badge), new PropertyMetadata(default(string)));
|
||||
"Text", typeof(string), typeof(Badge), new PropertyMetadata("0"));
|
||||
|
||||
public string Text
|
||||
{
|
||||
@@ -37,7 +37,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
var ctl = (Badge) d;
|
||||
var v = (int) e.NewValue;
|
||||
ctl.Text = v <= ctl.Maximum ? v.ToString() : $"{ctl.Maximum}+";
|
||||
ctl.SetCurrentValue(TextProperty, v <= ctl.Maximum ? v.ToString() : $"{ctl.Maximum}+");
|
||||
if (ctl.IsInitialized)
|
||||
{
|
||||
ctl.RaiseEvent(new FunctionEventArgs<int>(ValueChangedEvent, ctl)
|
||||
|
||||
Reference in new issue
Block a user