WPF: How to start from a window in a different assembly

前端 未结 3 981
梦如初夏
梦如初夏 2020-12-29 05:17

I googled this and still can\'t get it working

I have a WPF app and want to start from Main.xaml which is located in a different assembly. Both assemblies are in the

3条回答
  •  再見小時候
    2020-12-29 05:45

    I'd check your pack URI. Below is the uri I'd try. Think of 'component' as the root folder in your project and where I've put 'FolderName' put the appropriate folder name or remove it if Main.xaml is in the root of the project.

    StartupUri = new Uri(@"pack://application:,,,/CompanyName.VisualStudio.UI;component/FolderName/Main.xaml", UriKind.Absolute);

提交回复
热议问题