WinFormsアプリケーションから起動するためにWPF Desktopアプリケーションを使用できるようにする必要があります。WPFアプリケーション:WinForms Appから起動するとリソースが見つかりません
ただし、私はTelerikなどのサードパーティコントロールを使用していますが、WPFアプリケーションを起動しているWinFormsアプリケーションに同じ参照DLLをすべてコピーすると、アプリケーションを起動することができます。
例外は、常にapplication.xamlに関連付けられたファイルまたは依存ファイルが見つからないことです。おそらく実行アセンブリのためです。
WPFアプリケーションを起動するWinFormsアプリケーションへの参照を追加することは許可されていません。そのため、WPFアプリケーションを適切な場所に配置するにはどうすればよいですか?
これは、問題が発生したことを私のメインウィンドウのリソースセクションでここにもあります:
<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>
感謝します。
すぐにお返事ありがとうございます。これは間違いなく知っておくと便利ですが、この場合WPFアプリケーションはCOMクラスを介して起動されている可能性がありますので、私はこれを自由に使用できません。 WPFアプリケーションのコンストラクターでこれを強制したり、可能であればxamlに直接指定したりします。 – miriyo