Navigation state is a dictionary of <string, object> values carried between .NET MAUI Shell pages during navigation. It lets a destination receive data without encoding everything in a route string. section 7.5.5 section 7.6
A typical navigation-state flow is:
- Create the destination model, such as a Product object. section 7.5.5
- Register a route for the destination page. section 7.5.5
- Place the object in a Dictionary<string, object> using a key such as Product. section 7.5.5
- Call Shell.Current.GoToAsync with the route and dictionary. section 7.5.5
- Decorate the receiving page or binding context with QueryProperty and bind displayed values to page properties. section 7.5.5
Passing a product to ProductPage
var pageParams = new Dictionary<string, object> { { "Product", product } }; await Shell.Current.GoToAsync("productdetails", pageParams); The destination declares [QueryProperty(nameof(Product), nameof(Product))], receives the Product property, copies its values into bindable properties, and displays them with XAML Labels.
