Oxygene MaterialDesign WPF

Hi,

I’ve got problem with WPF application written with Oxygene. I’m using MaterialDesign for WPF and trying to show dialog message.


There are two projects - C# and Oxygene - the same code - two buttons on MainWindow - test button open dialog, test button2 open dialog from C# classlib.

When I call
var dial := new WPFApplication3.TestDialog();
await MaterialDesignThemes.Wpf.DialogHost.Show(dial, ‘RootDialog’);
everything works fine, but when I want to show this dialog after exception - application crashes - only using Oxygene code
try
raise new Exception(‘Parameter cannot be null’);
except
var dial := new WPFApplication3.TestDialog();
await MaterialDesignThemes.Wpf.DialogHost.Show(dial, ‘RootDialog’);
end;

Using Beta 9.1.100.2119