2012-07-22 61 views

回答

0

这可以在您的XAML来完成而已,所有你需要做的是HighlightBrush您的Datagrid重写你选择的颜色。只需在您的代码中的DataGrid标签中添加此 -

<DataGrid> 
    . 
    . 
    <DataGrid.Resources> 
     <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" 
           Color="Red"/> 
    </DataGrid.Resources> 
    . 
    . 
</DataGrid> 

Snapshpot与您的代码和资源到位(注意网格是空的,因为绑定不是为我工作,但红选区边界是很明显的) - Red Selection border

+0

请看我的回答/问题 – amitairos 2012-07-22 14:10:45