Set ItemsPanel of a DataGridCellsPresenter via Style not working

1.3k Views Asked by At

I'm trying to set the ItemsPanel of a DataGridCellsPresenter in the Resources of my Window.

<Style TargetType="{x:Type DataGridCellsPresenter}">
    <Setter Property="ItemsPanel">
        <Setter.Value>
            <ItemsPanelTemplate>
                <WPFVarTab:CustomDataGridCellsPanel IsItemsHost="True" />
            </ItemsPanelTemplate>
        </Setter.Value>
    </Setter>
</Style>

But my CustomDataGridCellsPanel is not used. It still uses the DataGridCellsPanel.

What am I doing wrong?

0

There are 0 best solutions below