开发者

TabControl unloads content when Visiblity is set to Collapsed

开发者 https://www.devze.com 2023-03-16 20:24 出处:网络
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 sp

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.

0

精彩评论

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