You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Having to set basic properties in the OnNavigatedTo lifecycle method can be repetitive. It would be good if there was a way to automatically set properties with a similar name.
Describe alternatives you've considered OnNavigatedTo provides an advance way to set parameters but may get repetitive. This method of parameter passing may mean you don't need to implement the INavigatedEvents interface on some viewmodels.
Proposed APIs
// as an annotation above a viewmodel you can do as many of the below as you wish:[MapNavigationParameter(nameof(TestParam),"test_param")]
Additional context
N/A
The text was updated successfully, but these errors were encountered:
BurkusCat
changed the title
[Feature] Auto-populate properties on navigation
[Feature] Map navigation parameters to properties on navigation
May 12, 2024
Is your feature request related to a problem? Please describe.
Having to set basic properties in the
OnNavigatedTo
lifecycle method can be repetitive. It would be good if there was a way to automatically set properties with a similar name.Describe the solution you'd like
Something similar to query properties in Shell might be nice: https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/shell/navigation#process-navigation-data-using-query-property-attributes. This allows you to map parameter names to a navigation parameter key which may be different.
Describe alternatives you've considered
OnNavigatedTo
provides an advance way to set parameters but may get repetitive. This method of parameter passing may mean you don't need to implement theINavigatedEvents
interface on some viewmodels.Proposed APIs
Additional context
N/A
The text was updated successfully, but these errors were encountered: