I have a project that uses some of the same features of the "Portfolio Analyzer" code base.
It defines two views to go in the "DockingRegion" - one of the views is displayed and the other is not. I cannot work out why the missing view is not showing.
The main code is as follows:
void worker_DoWork(object sender, DoWorkEventArgs e)
{
this.Dispatcher.Invoke(DispatcherPriority.Background, new Action(() =>
{
ShowWindow();
this.moduleManager.LoadModule("BundleModule");
this.moduleManager.LoadModule("BundleDetailsModule");
activateView();
}));
}
void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
win.Close();
}
void SelectedViewEventHandler(string ViewName)
{
if (ViewName == "Dashboard")
{
if(!worker.IsBusy)
worker.RunWorkerAsync();
}
}
private void activateView()
{
IRegion ribbonRegion = regionManager.Regions[RegionNames.RibbonRegion];
object dview = ribbonRegion.GetView("dashboardView");
ribbonRegion.Activate(dview);
IRegion dockingRegion = regionManager.Regions[RegionNames.DockingRegion];
object v1 = dockingRegion.GetView("bundleDetailsView");
object v2 = dockingRegion.GetView("bundleView");
dockingRegion.Activate(v2);
dockingRegion.Activate(v1);
}
The "bundleView" display as is full width, the "bundleDetailsView" does not show at all.
Unfortunately, I can't post all of the code on a public forum.