我正在尝试在我的窗口的资源中设置ItemsPanel
a DataGridCellsPresenter
。
<Style TargetType="{x:Type DataGridCellsPresenter}">
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<WPFVarTab:CustomDataGridCellsPanel IsItemsHost="True" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
但是我CustomDataGridCellsPanel
的没有用。它仍然使用DataGridCellsPanel
.
我究竟做错了什么?