WinUI3 C++WinRT Issue sharing class to all view models.
Ryan Gallagher
21
Reputation points
How do I share data bindings across pages? I have my MainWindow and am trying to use a frame to navigate to sub pages. These sub pages need access to the bindings of the mainWindow. I am using C++ and most examples have each view model self contained or don't go far enough to show how to share a view model. They simply show passing of information through their click handler. If there is an answer to this in C++WinRT please point me towards it. I was thinking of instantiating the view model on the app level and then referencing it across each View model.
Thank you.
Sign in to answer