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

This is not a bug, it is a question or issue #1263

Open
SagiriMOMO opened this issue Oct 29, 2024 · 1 comment
Open

This is not a bug, it is a question or issue #1263

SagiriMOMO opened this issue Oct 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@SagiriMOMO
Copy link

Describe the bug

Navigationview always recycling pages! This will create a new page instance when navigating to a new page, and the old page instance will not be saved. I don't want this, I hope my page instance can be saved during the switching process. How can I do it?

To Reproduce

navigationview

Expected behavior

I hope my page instance can be saved during the switching process.

Screenshots

屏幕截图 2024-10-29 141859

OS version

win11 24h2

.NET version

4.8

WPF-UI NuGet version

3.0.5

Additional context

No response

@SagiriMOMO SagiriMOMO added the bug Something isn't working label Oct 29, 2024
@Micaias-Bobadilla
Copy link

Hi, I understand that it does save the instance when you switch between views, but it depends on how you registered your dependency container in app.xaml.cs, every time you register a page, it must be through a AddSingleton.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants