【发布时间】:2012-05-23 20:58:06
【问题描述】:
当我向上滚动时,我有一个带有 AlternatingRowBackground 的 WPF(Win7 上的 4.0)数据网格,当我向下滚动时,行颜色保持在原位,数据在移动,颜色随着数据移动。 平时吗?有没有可能摆脱这种奇怪的行为?
网格 XAML:
<DataGrid AutoGenerateColumns="True"
CanUserAddRows="False"
Grid.Row="0" Grid.Column="0" Name="grdData"
ItemsSource="{Binding Path=.}" SelectionMode="Single"
HeadersVisibility="All"
AlternatingRowBackground="LightGray"
/>
注意:我还有其他关于滚动的问题 (WPF Datagrid scrolls up a bit when scrolled to end),但我不确定是否存在相关问题。
【问题讨论】:
标签: wpf scroll row wpfdatagrid alternating