开发者

WP7 Binding on collapsed/non visible controls

开发者 https://www.devze.com 2023-03-12 19:46 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消