Fix checkbox IsChecked property
This commit is contained in:
parent
957f9d7333
commit
8c97a625e1
|
@ -116,7 +116,7 @@ namespace Ooui
|
|||
protected bool SetBooleanAttributeProperty (string attributeName, bool newValue, [System.Runtime.CompilerServices.CallerMemberName] string propertyName = "")
|
||||
{
|
||||
var old = GetAttribute (attributeName) != null;
|
||||
if (old != newValue)
|
||||
if (old == newValue)
|
||||
return false;
|
||||
if (newValue)
|
||||
SetAttribute (attributeName, string.Empty);
|
||||
|
|
|
@ -40,11 +40,7 @@ namespace Ooui
|
|||
|
||||
public bool IsChecked {
|
||||
get => GetBooleanAttribute ("checked");
|
||||
set {
|
||||
if (SetBooleanAttributeProperty ("checked", value)) {
|
||||
TriggerEventFromMessage (Message.Event (Id, "change", IsChecked));
|
||||
}
|
||||
}
|
||||
set => SetBooleanAttributeProperty ("checked", value);
|
||||
}
|
||||
|
||||
public double Minimum {
|
||||
|
|
Loading…
Reference in New Issue