RousselleHolger-4707 avatar image
0 Votes"
RousselleHolger-4707 asked ·

Exception in DataContextChanged event

If there is an exception in the DataContextChanged event, the exception will stop displaying the MainPage, but the app is still running.
The same behavior when an exception is thrown in the DataContextChanged event of controls on the MainPage.
The exception can't be catched when adding UnhandledException += OnUnhandledException; in the App.cs

Added a small blank UWP app where an exception is thrown in the DataContextChanged of the MainPage.

· 3
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RousselleHolger-4707 I have reproduced the problem as you mentioned by using your sample. The OnUnhandledException event handler isn’t called when an exception is throw in DataContextChanged event handler. I need to consult other engineers. There may be some delays.

0 Votes 0 ·

Any updates on this topic?

0 Votes 0 ·
YanGu-MSFT avatar image YanGu-MSFT RousselleHolger-4707 ·

@RousselleHolger-4707 We are waiting for the response from other engineers. I will notify you as soon as there is new information about the case.

0 Votes 0 ·

0 Answers