开发者

How to stop Wpf Tabcontrol to unload Visual tree on Tab change

开发者 https://www.devze.com 2023-02-11 14:39 出处:网络
Hi My usercontrols 开发者_运维问答placed in tabs are unloaded and loaded every time the tabs are changed.It creates some unnecessary lag in the application.I am looking for some way to fix this behavi

Hi My usercontrols 开发者_运维问答placed in tabs are unloaded and loaded every time the tabs are changed.It creates some unnecessary lag in the application.I am looking for some way to fix this behavior.I know i have to subclass tabcontrol to change this behavior but how..?


You can find two different approaches to prevent this in this StackOverflow question:

  • WPF TabControl - how to preserve control state within tab items (MVVM pattern)

I recommend:

  • Keeping the WPF Tab Control from destroying its children
0

精彩评论

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