DataGrid.ItemsSource in DataGrid inside another DataGrid's RowDetails XAML causing Visual Studio 2019 to crash and exit

  • Thread starter Thread starter Mike Whalley
  • Start date Start date
M

Mike Whalley

Guest
That might sound a bit complicated, but I have a datagrid inside the rowdetails of another datagrid in a WPF window. I recently installed version 16.5.3 of VS2019. The WPF window builds and executes successfully, but if I try to edit the .xaml file, the VS2019 Designer fails to load the file and VS2019 closes down without any error message. The same thing does not happen using VS2017, and I have been using, and editing, this XAML code previously for some time.

I have managed to isolate the problem to the following assignment of the rowdetails' datagrid's ItemsSource - this is what is causing VS2019 to crash:

<DataGrid.ItemsSource>
<MultiBinding Converter="{StaticResource ValueConverterGetLast30Days}">
<Binding Path="Transactions"/>
<Binding Path="BankAccountID"/>
</MultiBinding>
</DataGrid.ItemsSource>

As you can see, it calls a ValueConverter which creates a list of the items to be inserted into the rowdetails datagrid.

I have managed to work around the problem by creating the datagrid's ItemsSource in code and adding the data to the datagrid on the LoadingRowDetails event being triggered.

But I am mystified as to why trying to load a WPF window containing this XAML code snippet into the VS2019 Designer (I get the same crash with Blend, incidentally) should cause VS2019 to crash, but not in VS2017 and also while still allowing the Solution to build and execute as expected, and thought I should publicise the problem.



Mike Whalley

Continue reading...
 
Back
Top