BurkusCat / Burkus.Mvvm.Maui

A simple MVVM framework for .NET MAUI. It provides: navigation, lifecycle events, parameter passing, native dialog abstractions, and testability.
MIT License
24 stars 5 forks source link

[Feature] Tab events #30

Open BurkusCat opened 9 months ago

BurkusCat commented 9 months ago

Is your feature request related to a problem? Please describe. I want to be able to know when a tab has been switched to or switched away from. Essentially, an equivalent to the INavigatedEvents but for tab selection.

Describe the solution you'd like I want to be able to have an interface on my tabbed page viewmodels that lets me know if the page has been switched away from. This is potentially complicated if using one viewmodel for many tabs (i.e. the tabbedpage's viewmodel is also the tabs' viewmodel)

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Proposed APIs

// ITabEvents
void OnTabSelected()

void OnTabDeselected()

Additional context N/A