DataGridTextColumn の色を変更しようとしています。
これが私がやっていることです:
<DataGridTextColumn
Header="Status"
Binding="{Binding IsActive,
Converter= {StaticResource BoolToStatusConverter}}"
Foreground="{Binding Path=IsActive,
Converter={StaticResource BoolToColorConverter}}"/>
テキストは正しく設定されていますが、色は変更されず、次のエラーが発生します。
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or
FrameworkContentElement for target element. BindingExpression:Path=IsActive;
DataItem=null; target element is 'DataGridTextColumn' (HashCode=40349079); target
property is 'Foreground' (type 'Brush')
これを機能させるにはどうすればよいですか?