Wpf 在实例化prism视图时已使用Devexpress TheManager路由事件

Wpf 在实例化prism视图时已使用Devexpress TheManager路由事件,wpf,devexpress,prism,prism-4,Wpf,Devexpress,Prism,Prism 4,我正在基于Prism框架的一个微小变化构建一个商业应用程序(行为上的一些变化,但不会影响我的问题) 我构建了一个shell应用程序,其中有一个shell窗口,该窗口是在vs2010中使用DevXPress dxwindow向导创建的。我在DevXPress布局面板中为我的主要内容创建了一个区域。然后,我在一个单独的项目中创建了一个视图,该视图也使用了DevXPress控件,然后针对该区域 当应用程序启动并且视图被注册并因此被“注入”时(在逻辑意义上,而不是DI或其他编程概念意义上)在该地区,我发

我正在基于Prism框架的一个微小变化构建一个商业应用程序(行为上的一些变化,但不会影响我的问题)

我构建了一个shell应用程序,其中有一个shell窗口,该窗口是在vs2010中使用DevXPress dxwindow向导创建的。我在DevXPress布局面板中为我的主要内容创建了一个区域。然后,我在一个单独的项目中创建了一个视图,该视图也使用了DevXPress控件,然后针对该区域

当应用程序启动并且视图被注册并因此被“注入”时(在逻辑意义上,而不是DI或其他编程概念意义上)在该地区,我发现了一个与开发XPress主题相关的巨大错误,但坦率地说,我不知道这到底是怎么回事。我应该指出,我的WPF知识正在快速增长,但仍然相当低

以下是详细信息

System.Windows.Markup.XamlParseException occurred
  Message='The invocation of the constructor on type 'DevExpress.Xpf.LayoutControl.LayoutControl' that matches the specified binding constraints threw an exception.' Line number '14' and line position '10'.
  Source=PresentationFramework
  LineNumber=14
  LinePosition=10
  StackTrace:
       at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
       at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
       at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
       at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at MyProject.Wpf.Modules.Partner.PartnerView.InitializeComponent() in c:\Workspace\Projects\MyProject\trunk\src\Wpf\MyProject.Wpf.Modules.Partner\PartnerView.xaml:line 1
       at MyProject.Wpf.Modules.Partner.PartnerView..ctor() in C:\Workspace\Projects\MyProject\trunk\src\Wpf\MyProject.Wpf.Modules.Partner\PartnerView.xaml.cs:line 24
  InnerException: System.Xaml.XamlObjectWriterException
       Message=Set property 'System.Windows.ResourceDictionary.Source' threw an exception.
       Source=System.Xaml
       LineNumber=0
       LinePosition=0
       StackTrace:
            at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
            at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue(Object obj, XamlMember property, Object value)
            at System.Xaml.XamlObjectWriter.SetValue(Object inst, XamlMember property, Object value)
            at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent)
            at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
            at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx)
            at System.Xaml.XamlObjectWriter.WriteEndMember()
            at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
            at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
            at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter)
            at System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled)
            at System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(Boolean isTraceEnabled)
            at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
            at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
            at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
            at System.Windows.FrameworkElement.UpdateThemeStyleProperty()
            at System.Windows.FrameworkElement.OnThemeStyleKeyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
            at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
            at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
            at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
            at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
            at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
            at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
            at System.Windows.FrameworkElement.set_DefaultStyleKey(Object value)
            at DevExpress.Xpf.Core.CornerBox..ctor()
            at DevExpress.Xpf.Core.PanelControllerBase.CreateScrollBars()
            at DevExpress.Xpf.Core.PanelControllerBase.CheckScrollBars()
            at DevExpress.Xpf.Core.Controller.set_ScrollBars(ScrollBars value)
            at DevExpress.Xpf.Core.ScrollControlController..ctor(IScrollControl control)
            at DevExpress.Xpf.LayoutControl.LayoutControllerBase..ctor(ILayoutControlBase control)
            at DevExpress.Xpf.LayoutControl.LayoutGroupController..ctor(ILayoutGroup control)
            at DevExpress.Xpf.LayoutControl.LayoutControlController..ctor(ILayoutControl control)
            at DevExpress.Xpf.LayoutControl.LayoutControl.CreateController()
            at DevExpress.Xpf.Core.PanelBase..ctor()
            at DevExpress.Xpf.Core.ScrollControl..ctor()
            at DevExpress.Xpf.LayoutControl.LayoutControlBase..ctor()
            at DevExpress.Xpf.LayoutControl.LayoutGroup..ctor()
            at DevExpress.Xpf.LayoutControl.LayoutControl..ctor()
            at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.InvokeDelegate(Action`1 action, Object argument)
            at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.CallCtorDelegate(XamlTypeInvoker type)
            at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.CreateInstance(XamlTypeInvoker type)
            at System.Xaml.Schema.XamlTypeInvoker.CreateInstance(Object[] arguments)
            at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstanceWithCtor(XamlType xamlType, Object[] args)
            at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(XamlType xamlType, Object[] args)
       InnerException: System.Windows.Markup.XamlParseException
            Message=Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.
            Source=PresentationFramework
            LineNumber=0
            LinePosition=0
            StackTrace:
                 at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
                 at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
                 at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
                 at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
                 at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
                 at MS.Internal.AppModel.AppModelKnownContentFactory.BamlConverter(Stream stream, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter)
                 at MS.Internal.AppModel.MimeObjectFactory.GetObjectAndCloseStream(Stream s, ContentType contentType, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter)
                 at System.Windows.ResourceDictionary.set_Source(Uri value)
                 at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<Create_BamlProperty_ResourceDictionary_Source>b__1c4(Object target, Object value)
                 at System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value)
                 at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
                 at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
            InnerException: System.TypeInitializationException
                 Message=The type initializer for 'DevExpress.Xpf.Core.ThemeManager' threw an exception.
                 Source=DevExpress.Xpf.Core.v10.2
                 TypeName=DevExpress.Xpf.Core.ThemeManager
                 StackTrace:
                      at DevExpress.Xpf.Core.ThemeManager.get_TraceSwitch()
                      at DevExpress.Xpf.Utils.Themes.DefaultStyleThemeKeyExtension.RegisterThemeType()
                      at DevExpress.Xpf.Utils.Themes.DefaultStyleThemeKeyExtension.ProvideValue(IServiceProvider serviceProvider)
                      at System.Windows.ResourceDictionary.EvaluateMarkupExtensionNodeList(XamlReader reader, IServiceProvider serviceProvider)
                      at System.Windows.ResourceDictionary.GetKeyValue(KeyRecord key, IServiceProvider serviceProvider)
                      at System.Windows.ResourceDictionary.SetKeys(IList`1 keyCollection, IServiceProvider serviceProvider)
                      at System.Windows.ResourceDictionary.SetDeferrableContent(DeferrableContent deferrableContent)
                      at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<Create_BamlProperty_ResourceDictionary_DeferrableContent>b__168(Object target, Object value)
                      at System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value)
                      at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
                      at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
                 InnerException: System.ArgumentException
                      Message=RoutedEvent Name 'ThemeChanged' for OwnerType 'System.Windows.DependencyObject' already used.
                      Source=PresentationCore
                      StackTrace:
                           at System.Windows.EventManager.RegisterRoutedEvent(String name, RoutingStrategy routingStrategy, Type handlerType, Type ownerType)
                           at DevExpress.Xpf.Core.ThemeManager..cctor()
                      InnerException:
发生System.Windows.Markup.XamlParseException

Message='在与指定绑定约束匹配的类型'DevExpress.Xpf.LayoutControl.LayoutControl'上调用构造函数时引发异常。'行号'14'和行位置'10'。
Source=PresentationFramework
行号=14
LinePosition=10
堆栈跟踪:
位于System.Windows.Markup.XamlReader.RewrapException(异常e、IXamlLineInfo、Uri baseUri)
在System.Windows.Markup.WpfXamlLoader.Load(XamlReader XamlReader、IXamlObjectWriterFactory writerFactory、Boolean skipJournaledProperties、Object rootObject、XamlObjectWriterSettings设置、Uri baseUri)
位于System.Windows.Markup.wpfxamloader.LoadBaml(XamlReader XamlReader、Boolean skipJournaledProperties、Object rootObject、XamlAccessLevel accessLevel、Uri baseUri)
位于System.Windows.Markup.XamlReader.LoadBaml(Stream-Stream,ParserContext-ParserContext,Object-parent,Boolean-closeStream)
位于System.Windows.Application.LoadComponent(对象组件,Uri resourceLocator)
在c:\Workspace\Projects\MyProject\trunk\src\Wpf\MyProject.Wpf.Modules.Partner\PartnerView.xaml中的MyProject.Wpf.Modules.Partner.PartnerView.InitializeComponent()处:第1行
在C:\Workspace\Projects\MyProject\trunk\src\Wpf\MyProject.Wpf.Modules.Partner\PartnerView.xaml.cs中的MyProject.Wpf.Modules.Partner.PartnerView..ctor()处:第24行
InnerException:System.Xaml.XamlObjectWriterException
Message=Set属性“System.Windows.ResourceDictionary.Source”引发异常。
Source=System.Xaml
行号=0
LinePosition=0
堆栈跟踪:
位于MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(对象指令,XamlMember属性,对象值)
在MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue处(对象obj,XamlMember属性,对象值)
位于System.Xaml.XamlObjectWriter.SetValue(对象指令,XamlMember属性,对象值)
位于System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx、XamlMember prop、对象值、布尔onParent)
位于System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
位于System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx)
位于System.Xaml.XamlObjectWriter.WriteEndMember()处
位于System.Xaml.XamlWriter.WriteNode(XamlReader阅读器)
位于System.Xaml.XamlServices.Transform(XamlReader-XamlReader,XamlWriter-XamlWriter,Boolean closeWriter)
位于System.Xaml.XamlServices.Transform(XamlReader-XamlReader,XamlWriter-XamlWriter)
位于System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(程序集程序集、字符串程序集名称、字符串资源名称、布尔值isTraceEnabled)
位于System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(已启用布尔值)
在System.Windows.SystemResources.FindDictionaryResource(对象键、类型typeKey、ResourceKey ResourceKey、Boolean isTraceEnabled、Boolean allowDeferredResourceReference、Boolean mustReturnDeferredResourceReference、Boolean&canCache)
位于System.Windows.SystemResources.FindResourceInternal(对象键,布尔allowDeferredResourceReference,布尔mustReturnDeferredResourceReference)
在System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe,FrameworkContentElement fce)
位于System.Windows.FrameworkElement.UpdateTimeStyleProperty()处
在System.Windows.FrameworkElement.OnThemeStyleKeyChanged(DependencyObject d,DependencyPropertyChangedEventArgs e)
位于System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
位于System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
位于System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs参数)
在System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex EntryIndex,DependencyProperty dp,PropertyMetadata,EffectiveValueEntry oldEntry,EffectiveValueEntry&newEntry,布尔强制WithDeferredReference,布尔强制WithCurrentValue,OperationType OperationType)
位于System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp、对象值、PropertyMetadata元数据、布尔强制WithDeferredReference、布尔强制WithCurrentValue、OperationType OperationType、布尔isInternal)
位于System.Windows.DependencyObject.SetValue(DependencyProperty dp,对象值)
在System.Windows.FrameworkElement.set\u DefaultStyleKey(对象值)处
在DevExpress.Xpf.Core.CornerBox..ctor()处
在DevExpress.Xpf.Core.PanelControllerBase.CreateScrollBars()上
在DevExpress.Xpf.Core.PanelControllerBase.CheckScrollBars()中
在DevExpress.Xpf.Core.Controller.set\u滚动条(滚动条值)
在DevExpress.Xpf.Core.ScrollControlCont