Hello,
Welcome to Microsoft Q&A!
Your problem is more related with C# polymorphism. If you want to ShellViewModel
could call the sub-class override method, you should use father reference point to sub-class instance.
ShellPage
public MainPage()
{
this.InitializeComponent();
Instance = this;
this.DataContext = new OM_01ViewModel() as ShellViewModel;
}
public static MainPage Instance;
SubPage
public CorePage()
{
this.InitializeComponent();
this.DataContext = MainPage.Instance.DataContext as OM_01ViewModel;
}
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.