The easiest way is to:
1/ Introduce a new virtual method in BaseViewModel (called something along the lines of "HandleNavigatedTo")
2/ Have BaseViewModel call "HandleNavigatedTo" based on your criteria
3/ Have BaseViewModel descendants override "HandleNavigatedTo" and do their stuff in that method
4/ Have BaseViewModel descendants NOT override "OnNavigatedTo"
public class BaseViewModel : ViewModelBaseX
{
protected virtual void HandleNavigatedTo(NavigationMode mode, Uri uri, IDictionary<string, string> queryString)
{
}
public override void OnNavigatedTo(NavigationMode mode, Uri uri, IDictionary<string, string> queryString)
{
if (condition)
{
HandleNavigatedTo(mode, uri, queryString);
}
}
}
public class AboutViewModel:BaseViewModel
{
public override void HandleNavigatedTo(NavigationMode mode, Uri uri, IDictionary<string, string> queryString)
{
// here some code to be execute
}
}