Browse Source
Merge pull request #11024 from Enscape/fixes/radiobutton-sibling-setcurrentvalue
Use `SetCurrentValue` to manipulate sibling `RadioButton`s
pull/11053/head
Max Katz
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
src/Avalonia.Controls/RadioButton.cs
|
|
|
@ -86,7 +86,7 @@ namespace Avalonia.Controls |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (current != radioButton && current.IsChecked.GetValueOrDefault()) |
|
|
|
current.IsChecked = false; |
|
|
|
current.SetCurrentValue(IsCheckedProperty, false); |
|
|
|
i++; |
|
|
|
} |
|
|
|
if (group.Count == 0) |
|
|
|
@ -193,7 +193,7 @@ namespace Avalonia.Controls |
|
|
|
foreach (var sibling in siblings) |
|
|
|
{ |
|
|
|
if (sibling.IsChecked.GetValueOrDefault()) |
|
|
|
sibling.IsChecked = false; |
|
|
|
sibling.SetCurrentValue(IsCheckedProperty, false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|