I've been toying around with trying to load modules in DockPanes using MVVM Prism. I can do it with Tabs, but have not been able to figure out how to do it with DockPanes.
Any ideas?
I get the below cast error when I try and add the module to a Region.
Any ideas?
I get the below cast error when I try and add the module to a Region.
Microsoft.Practices.Composite.Modularity.ModuleInitializeException was unhandled |
Message="An exception occurred while initializing module 'Help'. \r\n - The exception message was: Unable to cast object of type 'VistaAdmin.Help.Presentation.HelpView' to type 'Telerik.Windows.Controls.RadPane'.\r\n - The Assembly that the module was trying to be loaded from was:VistaAdmin.Help, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\r\n Check the InnerException property of the exception for more information. If the exception occurred while creating an object in a DI container, you can exception.GetRootException() to help locate the root cause of the problem. \r\n " |
Source="Microsoft.Practices.Composite" |
ModuleName="Help" |
StackTrace: |
at Microsoft.Practices.Composite.Modularity.ModuleInitializer.HandleModuleInitializationError(ModuleInfo moduleInfo, String assemblyName, Exception exception) in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite\Modularity\ModuleInitializer.cs:line 106 |
at Microsoft.Practices.Composite.Modularity.ModuleInitializer.Initialize(ModuleInfo moduleInfo) in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite\Modularity\ModuleInitializer.cs:line 68 |
at Microsoft.Practices.Composite.Modularity.ModuleManager.InitializeModule(ModuleInfo moduleInfo) in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite\Modularity\ModuleManager.cs:line 248 |
at Microsoft.Practices.Composite.Modularity.ModuleManager.LoadModulesThatAreReadyForLoad() in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite\Modularity\ModuleManager.cs:line 209 |
at Microsoft.Practices.Composite.Modularity.ModuleManager.LoadModuleTypes(IEnumerable`1 moduleInfos) in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite\Modularity\ModuleManager.cs:line 168 |
at Microsoft.Practices.Composite.Modularity.ModuleManager.LoadModulesWhenAvailable() in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite\Modularity\ModuleManager.cs:line 142 |
at Microsoft.Practices.Composite.Modularity.ModuleManager.Run() in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite\Modularity\ModuleManager.cs:line 71 |
at Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.InitializeModules() in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite.UnityExtensions\UnityBootstrapper.cs:line 239 |
at Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.Run(Boolean runWithDefaultConfiguration) in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite.UnityExtensions\UnityBootstrapper.cs:line 112 |
at Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.Run() in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite.UnityExtensions\UnityBootstrapper.cs:line 69 |
at VistaAdmin.Shell.App.RunInDebugMode() in C:\Users\GClark\Documents\Visual Studio 2008\Projects\VistaAdmin\VistaAdmin.Shell\App.xaml.cs:line 44 |
at VistaAdmin.Shell.App.OnStartup(StartupEventArgs e) in C:\Users\GClark\Documents\Visual Studio 2008\Projects\VistaAdmin\VistaAdmin.Shell\App.xaml.cs:line 25 |
at System.Windows.Application.<.ctor>b__0(Object unused) |
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) |
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) |
at System.Windows.Threading.DispatcherOperation.InvokeImpl() |
at System.Threading.ExecutionContext.runTryCode(Object userData) |
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) |
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) |
at System.Windows.Threading.DispatcherOperation.Invoke() |
at System.Windows.Threading.Dispatcher.ProcessQueue() |
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) |
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) |
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) |
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) |
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) |
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter) |
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) |
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) |
at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg) |
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) |
at System.Windows.Application.RunInternal(Window window) |
at VistaAdmin.Shell.App.Main() in C:\Users\GClark\Documents\Visual Studio 2008\Projects\VistaAdmin\VistaAdmin.Shell\obj\Debug\App.g.cs:line 0 |
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) |
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() |
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) |
at System.Threading.ThreadHelper.ThreadStart() |
InnerException: System.InvalidCastException |
Message="Unable to cast object of type 'VistaAdmin.Help.Presentation.HelpView' to type 'Telerik.Windows.Controls.RadPane'." |
Source="Telerik.Windows.Controls.Docking" |
StackTrace: |
at Telerik.Windows.Controls.RadPaneGroup.OnItemsChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\RadPaneGroup.cs:line 964 |
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) |
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) |
at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e) |
at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list) |
at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args) |
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) |
at MS.Internal.Controls.InnerItemCollectionView.Add(Object item) |
at System.Windows.Controls.ItemCollection.Add(Object newItem) |
at Telerik.Windows.Controls.RadSplitContainer.PrepareContainerForItemOverride(DependencyObject element, Object item) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\RadSplitContainer.cs:line 673 |
at System.Windows.Controls.ItemsControl.MS.Internal.Controls.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item) |
at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container) |
at System.Windows.Controls.Panel.addChildren(GeneratorPosition pos, Int32 itemCount) |
at System.Windows.Controls.Panel.OnItemsChangedInternal(Object sender, ItemsChangedEventArgs args) |
at System.Windows.Controls.Panel.OnItemsChanged(Object sender, ItemsChangedEventArgs args) |
at System.Windows.Controls.ItemContainerGenerator.OnItemAdded(Object item, Int32 index) |
at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) |
at System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e) |
at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list) |
at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args) |
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) |
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) |
at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e) |
at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list) |
at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args) |
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) |
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) |
at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex) |
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) |
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedAction action, Object item, Int32 index) |
at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item) |
at System.Collections.ObjectModel.Collection`1.Add(T item) |
at MS.Internal.Data.EnumerableCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args) |
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) |
at Microsoft.Practices.Composite.Presentation.Regions.ViewsCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite.Presentation\Regions\ViewsCollection.cs:line 102 |
at Microsoft.Practices.Composite.Presentation.Regions.ViewsCollection.AddAndNotify(IList items) in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite.Presentation\Regions\ViewsCollection.Desktop.cs:line 30 |
at Microsoft.Practices.Composite.Presentation.Regions.ViewsCollection.UnderlyingCollection_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite.Presentation\Regions\ViewsCollection.cs:line 142 |
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) |
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedAction action, Object item, Int32 index) |
at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item) |
at System.Collections.ObjectModel.Collection`1.Add(T item) |
at Microsoft.Practices.Composite.Presentation.Regions.Region.InnerAdd(Object view, String viewName, IRegionManager scopedRegionManager) in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite.Presentation\Regions\Region.cs:line 313 |
at Microsoft.Practices.Composite.Presentation.Regions.Region.Add(Object view, String viewName, Boolean createRegionManagerScope) in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite.Presentation\Regions\Region.cs:line 218 |
at Microsoft.Practices.Composite.Presentation.Regions.Region.Add(Object view) in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite.Presentation\Regions\Region.cs:line 189 |
at VistaAdmin.Help.Applications.ModuleController.ShowHelpView() in C:\Users\GClark\Documents\Visual Studio 2008\Projects\VistaAdmin\VistaAdmin.Help\Applications\ModuleController.cs:line 55 |
at VistaAdmin.Help.Applications.ModuleController.ShowContents() in C:\Users\GClark\Documents\Visual Studio 2008\Projects\VistaAdmin\VistaAdmin.Help\Applications\ModuleController.cs:line 62 |
at VistaAdmin.Help.Applications.ModuleController.Initialize() in C:\Users\GClark\Documents\Visual Studio 2008\Projects\VistaAdmin\VistaAdmin.Help\Applications\ModuleController.cs:line 47 |
at VistaAdmin.Help.Module.Initialize() in C:\Users\GClark\Documents\Visual Studio 2008\Projects\VistaAdmin\VistaAdmin.Help\Module.cs:line 34 |
at Microsoft.Practices.Composite.Modularity.ModuleInitializer.Initialize(ModuleInfo moduleInfo) in D:\Application Installs\Composite Controls 2009\CAL\Desktop\Composite\Modularity\ModuleInitializer.cs:line 64 |
InnerException: |