Comments (2)
Here is a little clip from my repro sample, you can see that as soon as I close the navigation page popover, the other commands stop working, the view model code is below & is incredibly simple:
public class MainViewModel : ViewModelBase
{
public DelegateCommand NavigateCommand { get; }
public DelegateCommand ModalCommand { get; }
public DelegateCommand PopoverCommand { get; }
public DelegateCommand NavPopoverCommand { get; }
public MainViewModel(INavigationService navigationService)
: base(navigationService)
{
Title = "Main Page";
NavigateCommand = new DelegateCommand(OnNavigate);
ModalCommand = new DelegateCommand(OnModal);
PopoverCommand = new DelegateCommand(OnPopover);
NavPopoverCommand = new DelegateCommand(OnNavPopover);
}
private async void OnNavigate()
{
var nav = await navigationService.CreateBuilder()
.AddSegment<AnotherViewModel>()
.NavigateAsync();
if (!nav.Success)
{
Debugger.Break();
}
}
private async void OnModal()
{
var navParams = new NavigationParameters()
{
{ KnownNavigationParameters.UseModalNavigation, false },
};
var nav = await navigationService.CreateBuilder()
.AddNavigationPage(true)
.AddSegment<AnotherViewModel>()
.WithParameters(navParams)
.NavigateAsync();
if (!nav.Success)
{
Debugger.Break();
}
}
private async void OnPopover()
{
var nav = await navigationService.CreateBuilder()
.AddSegment<PopoverViewModel>(true)
.NavigateAsync();
if (!nav.Success)
{
Debugger.Break();
}
}
private async void OnNavPopover()
{
var nav = await navigationService.CreateBuilder()
.AddNavigationPage(true)
.AddSegment<PopoverViewModel>()
.NavigateAsync();
if (!nav.Success)
{
Debugger.Break();
}
}
}
from prism.
closed by #3072
from prism.
Related Issues (20)
- [BUG] Plugin.Popups.Maui on iOS navigate to new page when showing popup Page HOT 10
- [BUG] Absolute navigation not working on iOS HOT 3
- [BUG] Wiring view models for pages in tabbed page are done by name HOT 1
- [BUG] Popup Dialog can't fullscreen and also DialogLayout.CloseOnBackgroundTapped not working. HOT 5
- Add CloseDialog to IDialogService or Extension Method
- [BUG] Prism and MauiCompatibility are incompatibile on Windows HOT 6
- [BUG] Page.OnBackButtonPressed not called in MAUI Android HOT 12
- [BUG] Android hardware back button causes app to go to background when pressed on a TabbedPage inside a NavigationPage
- [BUG] Navigation Uri results in NullReferenceException
- [BUG] GoBackTo/GoBack can't return to a tabbed page HOT 4
- [BUG] BindingContext never cleared on Android after #3151 was merged
- [Enhancement] [TabbedPage] Configure TabbedPage Title HOT 4
- [BUG] CS8012 on publish net8.0-ios HOT 7
- [BUG] Popup Dialog does not open when called from a Service after using Absolute Navigation.
- [BUG] Object reference not set to an instance of an object when UseMauiCompatibility is enabled
- [BUG] Different Navigation Result between NavigateAsync(String) or NavigateAsync(Uri) when using RelativeBack() or ".." as Segment
- [BUG] Keyed services not supported
- [BUG] Pages remain in memory after absolute navigation and garbage collection HOT 1
- [BUG] Using Rules for DryIocContainerExtensions throws NavigationException HOT 1
- [Enhancement] Support Dialog ViewModel initialization HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prism.