سؤال

I have this problem with a tooltip in a datagrid( See picture )enter image description here But it's only then the row is selected ( See picture below )enter image description here

Have can i change the the style in the datagrid to make the the Foreground Black then the row is selected.

هل كانت مفيدة؟

المحلول

Note that the white comes from the same resource as your highlighted first cell, so this will be affected as well.

Try this :

<DataGrid.Resources>
    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Orange"/>
    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black"/>
</DataGrid.Resources>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top