-
Notifications
You must be signed in to change notification settings - Fork 1.2k
workaround for checkbox not propagating changes to KeepPrivate property #64
Conversation
We made an assumption here that the CheckBox IsChecked property would update the property on the viewmodel, but this isn't working when the user control is hosted in the Team Explorer panel.
|
||
d(Observable.FromEventPattern<RoutedEventArgs>(makePrivate, "Unchecked") | ||
.Subscribe(_ => ViewModel.KeepPrivate = false)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a comment on why this abomination is required as opposed to the more straightforward code that works elsewhere. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@gulbanana We're not using XAML bindings. We're using ReactiveUI bindings. Note that the It works over there, but not here for some reason. |
Ready for review. |
😢 Thanks for the fix @shiftkey! ✨ |
workaround for checkbox not propagating changes to KeepPrivate property
ah, ok. i've definitely experienced weird partial-supportedness with the IsChecked dependencyproperty before but that was using {Binding}, not reactiveui. |
Proposed fix for #62 by observing the events directly