TabControl unloads content when Visiblity is set to Collapsed
When I set tabItem.Visiblity
开发者_如何学JAVA to collapsed, the tab control unloads the content. How do I prevent this from happening?
Try setting it to Visibility.Hidden
instead, this reserves the space for the UI element, whereas Collapsed doesn't.
Not possible.check if any trigger is attached to Visibility changed. Also this suggests something wrong in your design. View should not hold the state, ViewModel should have the state. If state is with View only then it can loose information on visbility collapsed.
精彩评论