Description
I have a WPF application using WebView2 and Prism for MVVM.
I'm listening to the event "CoreWebView2InitializationCompleted" on both the code-behind, and on the ViewModel (via "prism:InvokeCommandAction"
In a normal situation, both methods are called (first the one on the code behind, and then the one on the ViewModel).
But when the Runtime is not installed, method on the code behind is called (correctly with WebView2RuntimeNotFoundException), but the one on the ViewModel is not. It happens only on this case, for any other exception both methods are called.
Description I have a WPF application using WebView2 and Prism for MVVM. I'm listening to the event "CoreWebView2InitializationCompleted" on both the code-behind, and on the ViewModel (via "prism:InvokeCommandAction"
In a normal situation, both methods are called (first the one on the code behind, and then the one on the ViewModel).
But when the Runtime is not installed, method on the code behind is called (correctly with WebView2RuntimeNotFoundException), but the one on the ViewModel is not. It happens only on this case, for any other exception both methods are called.
Version SDK: 1.0.818.41 Runtime: 90.0.818.42 Framework: WPF, .NET 5.0, Prism (or MVVMLight). OS: Win10 2004 build 19041.928
Repro Steps 1- Uninstall WebView2 runtime. 2- Compile and run the attached VS solution. testPrism.zip
OBS Tested also with MvvmLight toolkit, same result.
===== on MainWindow.xaml:
===== On MainWindow.xaml.cs `
====
On ViewModel: ` class MainWindowViewModel : BindableBase { public MainWindowViewModel() { Url = https://google.com/
} `
AB#33157035