Open DerMoonbreaker opened 3 months ago
I guess it´s related because registering views as singleton when navigating to another location the view was disposed. To understand what is happening I recommend you adding some OnAppearing, OnDisapearing events to know the life cycle. This is nothing related to BarcodeImage. If Transient doesn´t change the behaviour is because it´s accessing in some way the destroyed instance (the old one), that´s the reason why it seems doesn´t change. Try to compare the instances.
Hello LBoullosa
Thank you for your reply. I try to add your hints. one information about "This is nothing related to BarcodeImage": disabling die barcode on the view eliminate the error. All other elements on the view do not have such a problem. but let me first try whats happend when I add your hints.
best regards from germany
Hello
a View should show a QR-Code for transfering some informations to an other device
the first await Shell.Current.GoToAsync(nameof(SettingsView), true); works perfect
the second call after going back to the MainView with await Shell.Current.GoToAsync(".."); ends in a System.ObjectDisposedException: 'Cannot access a closed Stream.'
After removing the cv:BarcodeImage no problems comes up.
Changing Settings from Singelton to Transitions do not change the behaviour
here some Codesnippets out of the Project
MauiProgram.cs
MainViewModel.cs
SettingsView.xaml
SettingsViewModel.cs
I hope this was all relevant stuff does anyone have an idear maybe I'm doing some wrong and I hope my english is not to bad