I have a DataGrid in xaml that takes its data from a ListCollectionView coming from the ViewModel.
How can I create a DesignData file that fills the ListCollectionView? As the ListCollectionView constructor has one parameter (the list) I don't know how to create the ListCollectionView in the DesignData xaml file.
If I have the following xaml:
<DataGrid Grid.Row="1" AutoGenerateColumns="False" ItemsSource="{Binding Parameters}">
And the following designData:
<ParameterEditor:ParameterEditorViewModel.Parameters>
<ParameterEditor:ParameterViewModel Group="Parameter Group 1" Index="Pn001" Address="3001.001" Description="This is a test parameter 1" Value="100" DriveValue="200" Default="50" Range="0 to 400" Unit="A" />
<ParameterEditor:ParameterViewModel Group="Parameter Group 1" Index="Pn002" Address="3001.010" Description="This is a test parameter 2" Value="200" DriveValue="300" Default="40" Range="0 to 100" Unit="B" />
</ParameterEditor:ParameterEditorViewModel.Parameters>
Everything works.
If I change the xaml to:
<DataGrid Grid.Row="1" AutoGenerateColumns="False" ItemsSource="{Binding GroupedParameters}">
And GroupedParameters is a ListCollectionView, how can I create the DesignData?