GilShalit
GilShalit

Reputation: 6463

How do I have alternative content in a DataGrid.RowHeaderTemplate?

In a DataGrid, I'm using the RowDetails area to load a UserControl with its own ViewModel - works very well.

            <DataGrid.RowDetailsTemplate>
                <DataTemplate>
                    <vw:IndicesView DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}},
                                Path=DataContext.DrillDownIndexVM}" />
                </DataTemplate>
            </DataGrid.RowDetailsTemplate>

I now want to use alternative UserControls, depending on a property in the main ViewModel.

How can this be done? Is the answer?

Upvotes: 0

Views: 228

Answers (1)

Related Questions