I am trying to use Caliburn Micro as the framework for WPF inside an Excel 2013 Actions Pane, however I am unsure about how this should be done since there is very little documentation on this and I couldn't find much via a web search.
Basically I have referenced the articles on VSTO within Caliburn Micro discussions. So far I have:
1) An Actions Pane added to the Excel document in the ThisWorkbook_Startup method - no problem there.
2) On the design of the Actions Pane, I dropped on a simple ShellView user control
5) In the ActionsPane_Load event, I placed a call
If I remove the ShellView user control from the design surface and change the ShellView.xaml to be a Window instead of a user control, it is no longer listed in the Visual Studio toolbox as a control and I can't drop it onto the design surface. Adding the following code in the Actions Pane load event does not cause the ShellView to show up.
Basically I have referenced the articles on VSTO within Caliburn Micro discussions. So far I have:
1) An Actions Pane added to the Excel document in the ThisWorkbook_Startup method - no problem there.
2) On the design of the Actions Pane, I dropped on a simple ShellView user control
<DockPanel>
<Label Content="Hello World!" />
<TabControl x:Name="Items">
<TabControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding DisplayName}" />
</StackPanel>
</DataTemplate>
</TabControl.ItemTemplate>
</TabControl>
</DockPanel>
3) The ShellViewModel.cs haspublic class ShellViewModel : Conductor<IScreen>.Collection.OneActive
{
public ShellViewModel()
{
ActivateItem(new UploadViewModel());
}
}
}
4) I have a MefBootStrapper, derived from BootstrapperBase passing false to the base constructor. The rest is standard MEF bootstrapper code.5) In the ActionsPane_Load event, I placed a call
new MefBootstrapper().Start();
I see the Hello World! appearing in the Action Pane but there is nothing in the TabControl. The debugger calls the Configure and GetInstance methods of the MefBootstrapper.If I remove the ShellView user control from the design surface and change the ShellView.xaml to be a Window instead of a user control, it is no longer listed in the Visual Studio toolbox as a control and I can't drop it onto the design surface. Adding the following code in the Actions Pane load event does not cause the ShellView to show up.
var windowManager = IoC.Get<IWindowManager>();
windowManager.ShowWindow(new ShellViewModel());
All code is in a single solution. Has anyone tried this who can point me in the right direction.