WP7 Binding on collapsed/non visible controls
I have a Listbox in a PivotItem, as well as a ListBox in a Grid which is normally collapsed. Both ListBoxes have their ItemSource and SelectedItem properties bound to a view model. I put a breakpoint on the getters and setters of the ViewModel properties and noticed that they get called even if the bound controls are not visible or collapsed. Is it开发者_StackOverflow possible to have the binding only active when the bound control can be interacted with?
Only if you want to write code to unbind and rebind it. Not possible with pure markup.
精彩评论