I’m using WPF, so I created myViewModel : DockableScreen and linked MyView : UserControl class. I wish to get access to MyView class in plugin, but I can’t find a direct way to MyView even from myViewModel
public partial class MyListView : UserControl
{
public MyListView ()
{
InitializeComponent();
}
}
...
[Export(typeof(IDockableScreen))]
class MyViewModel : DockableScreen
{
public MyViewModel()
{
this.DisplayName = "Example";
this.PanelId = "ID";
}
}
In my Plugin, I found way to myViewModel like
IDockAwareWindowManager dockManager = IoC.Get<IDockAwareWindowManager>();
SwimLaneUmlViewModel DockScreen;
foreach (var dock in dockManager.DockPanels)
{
if (dock.PanelId == "ID") DockScreen = dock;
}
Right now, I just save MyView into global variable, but it doesn’t feel right)