如何停止 Wpf Tabcontrol 在 Tab 更改时卸载可视树 [英] How to stop Wpf Tabcontrol to unload Visual tree on Tab change

查看:28
本文介绍了如何停止 Wpf Tabcontrol 在 Tab 更改时卸载可视树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次更改选项卡时,都会卸载和加载放置在选项卡中的用户控件.这会在应用程序中造成一些不必要的延迟.我正在寻找解决此行为的方法.我知道我必须子类化 tabcontrol 才能更改此设置行为,但如何...?

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..?

推荐答案

你可以在这个 StackOverflow 问题中找到两种不同的方法来防止这种情况:

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

我推荐:

这篇关于如何停止 Wpf Tabcontrol 在 Tab 更改时卸载可视树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆