I have a Page within a WPF navigation-style application that displays search results. The page contains several data-bound controls. The page itself works fine; it performs the search and returns results. The data-bound CheckBox controls work properly.
But if I click a result link and then click the back button to return to the results list, all of my CheckBox.IsChecked
data bindings are broken. Other data bound controls (ComboBoxes, DatePickers, etc.) continue to work as expected. Binding to other properties on the CheckBox control, like IsEnabled
, works properly. But the IsChecked
binding remains broken until I refresh the page.
Here's the XAML used for one of my CheckBox controls:
<CheckBox IsChecked="{Binding IncludeNote}" Content="Note" IsEnabled="{Binding IsBusy, Converter={StaticResource boolNot}}" />
As you can see, there's nothing fancy going on here. But after navigating the WPF app forward or backward to the page, the IsChecked
binding will be broken while the IsEnabled
property will continue to work.
What's going on here? Is this a bug?
UPDATE: After playing around with some alternatives, I discovered that this problem also affects the ToggleButton control, which CheckBox derives from.
UPDATE2: And it's also broken for the TextBox.Text property.
Is there a way to "refresh" the data bindings for these controls? Or should I take some other approach to troubleshooting this issue?