【发布时间】:2016-03-22 13:30:43
【问题描述】:
我需要使我的 WPF 桌面应用程序可以从 WinForms 应用程序启动。
但是,我正在使用第三方控件(例如来自 Telerik),并且只有将所有相同的引用 DLL 复制到正在启动 WPF 应用程序的 WinForms 应用程序才能启动该应用程序。
例外情况始终是找不到与 application.xaml 关联的文件或依赖文件。大概是因为正在执行的程序集。
我不允许添加对启动 WPF 应用程序的 WinForms 应用程序的引用,那么如何强制我的 WPF 应用程序查找正确的位置?
问题出现在此处以及我的 MainWindow 的资源部分中:
<Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/System.Windows.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.Input.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.Data.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.Docking.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
非常感谢。
【问题讨论】:
标签: .net wpf winforms xaml telerik