Skip to content

Commit

Permalink
Merge pull request #12584 from Actipro/fix-togglesplitbutton-ischecked
Browse files Browse the repository at this point in the history
Updated ToggleSplitButton.IsChecked to bind TwoWay by default, same as ToggleButton.
  • Loading branch information
Dan Walmsley authored Aug 19, 2023
2 parents b98cec5 + 3dd62bf commit f16ab2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Avalonia.Controls/SplitButton/ToggleSplitButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using Avalonia.Controls.Metadata;
using Avalonia.Controls.Primitives;
using Avalonia.Data;
using Avalonia.Interactivity;
using Avalonia.Styling;

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

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

0 comments on commit f16ab2f

Please sign in to comment.