Skip to content

Commit f16ab2f

Browse files
author
Dan Walmsley
authored
Merge pull request #12584 from Actipro/fix-togglesplitbutton-ischecked
Updated ToggleSplitButton.IsChecked to bind TwoWay by default, same as ToggleButton.
2 parents b98cec5 + 3dd62bf commit f16ab2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Avalonia.Controls/SplitButton/ToggleSplitButton.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
using Avalonia.Controls.Metadata;
44
using Avalonia.Controls.Primitives;
5+
using Avalonia.Data;
56
using Avalonia.Interactivity;
67
using Avalonia.Styling;
78

@@ -36,8 +37,7 @@ public event EventHandler<RoutedEventArgs>? IsCheckedChanged
3637
/// Defines the <see cref="IsChecked"/> property.
3738
/// </summary>
3839
public static readonly StyledProperty<bool> IsCheckedProperty =
39-
AvaloniaProperty.Register<ToggleSplitButton, bool>(
40-
nameof(IsChecked));
40+
AvaloniaProperty.Register<ToggleSplitButton, bool>(nameof(IsChecked), false, defaultBindingMode: BindingMode.TwoWay);
4141

4242
/// <summary>
4343
/// Initializes a new instance of the <see cref="ToggleSplitButton"/> class.

0 commit comments

Comments
 (0)