2012-07-22 60 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