AnsweredAssumed Answered

Access one Page ViewModel from another Page ViewModel

Question asked by david.lamartina_NCS on Oct 22, 2019
Latest reply on Oct 30, 2019 by david.lamartina_NCS

To avoid creating another complex object within our Add-In's primary Module class, we'd like to have some our Page View Models (used in our custom Options pages) access one another. Is there any kind of built-in or best practice way of doing this?


Given the singleton nature of Dockpanes, it seems like this would be possible in that context (something like a call to FrameworkApplication.DockPaneManager.Find(_dockPaneID within another dock pane), where _dockPaneID is known, and we cast the result to whatever specific DockPane subclass we need.


Similarly, there's the "Current" scheme used with Modules, which just returns the result of a call to FindModule(_moduleID).


Is there something analogous to be done with Pages? If not, has anyone achieved something similar using a different scheme? Ultimately, we just need various options Pages to know about each other's changed properties, which represent the settings of our Add-In.