Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoReloadTabControl #17722

Open
NeverMorewd opened this issue Dec 9, 2024 · 2 comments
Open

NoReloadTabControl #17722

NeverMorewd opened this issue Dec 9, 2024 · 2 comments

Comments

@NeverMorewd
Copy link
Contributor

Is your feature request related to a problem? Please describe.

NoReloadTabControl:
https://stackoverflow.com/questions/3601125/wpf-tabcontrol-preventing-unload-on-tab-change

Describe the solution you'd like

Add a new StyledProperty NeedReload ,default value is true.
or
Add a new control NoReloadTabControl inherited from TabControl.

Describe alternatives you've considered

No response

Additional context

No response

@stevemonaco
Copy link
Contributor

Such API design would need much more work.

The current practice is to use TabStrip instead as the navigation menu portion and then manage the view creation, caching, and showing yourself.

@maxkatz6
Copy link
Member

DevExpress have TabContentCacheMode property for that: https://docs.devexpress.com/WPF/DevExpress.Xpf.Core.DXTabControl.TabContentCacheMode

Interestingly, it's not only keeping controls alive, but also keeps them in the visual tree. In case of Avalonia, I suppose, it still should be removed from the logical tree...or would it be a bad idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants