It should be possible to bind the isChecked property to another property (e.g. for two-way binding)
| Capability | Priority |
| :---------- | :------- |
| isChecked should support bindings | Must |
@adambarlow do you own this one ?
MUX_PROPERTY_NEEDS_DP_FIELD seems to be used incorrectly for this property. @jevansaks to confirm. I think this needs to be straight up dependency property that is public.
@ranjeshj You typed "@jevansa". Will let you correct it 🙂
Very weird, why is this not a public DP? Would changing that to a public DP be considered a breaking change here or can/should we change this now?
Very weird, why is this not a public DP? Would changing that to a public DP be considered a breaking change here or can/should we change this now?
This would be adding API, so I think this should be fine. @MikeHillberg to correct me if I am wrong.
Wouldn't mind working on this though would refer to @chingucoding in case he's already working on it/wants to.
Sure, you can go for it @FelixDev . Probably an easy issue to fix: Update IDL and maybe add a test to check that binding is working.
@FelixDev Please hold for the time being. I am trying to figure out if this was intentional or accidental.
x:Bind should work for this property too in the meantime, right?
@YuliKl took commanding some time ago, but I can help if you have a specific question from me.
I am trying to figure out if this was intentional or accidental.
I would be surprised to learn that this had been a deliberate choice, feels like an accident that isChecked isn't already bindable.
@FelixDev confirmed that this was accidental. Please feel free to go ahead with the change. Thanks!
@ranjeshj Alright 🙂
I did some testing locally and I noticed that binding in XAML (two-way binding,...) already works. As in
<muxc:ToggleSplitButton x:Name="BindingToggleSplitButton" Content="IsChecked" IsChecked="{Binding IsChecked, Mode=TwoWay}"/>
where IsChecked
is a public property of the DataContext. We still need to expose the DP in order to set it via
BindingToggleSplitButton.SetValue(ToggleSplitButton.IsCheckedProperty, true);
Most helpful comment
I would be surprised to learn that this had been a deliberate choice, feels like an accident that isChecked isn't already bindable.