Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

'Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '8' and line position '24'.

$
0
0

Hi,

I am trying to integrate Windows Form with an exisiting WPF application. The scenarion is the Windows Form will call(open) WPF application by using button control. My code in windows form is like this 

MainWindow window = new MainWindow();
ServiceInjector.InjectServices();
ViewModelBase mainViewModel = new MainWindowViewModel();
window.DataContext = mainViewModel;
window.Show();

MainWindow is the XAML in WPF application. However I got the error like this:

XamlParseException

"'Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '8' and line position '24'."

How to resolve this issue ? Thanks a lot.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>