question

BitSmithy-4663 avatar image
0 Votes"
BitSmithy-4663 asked ·

How to set font color converter during autogeneration column in DataGrid

Hello,



I have DataGrid and I want to set to foreground color property data converter
caled FontColorConverter

How to do it in event

     private void MyDataGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
     {

???

}


windows-uwp
· 5
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, in AutoGeneratingColumn event, the column header is usually modified. I want to ask if you want to modify the color of a cell in the column or the color of all text in the column?

0 Votes 0 · ·

I want to set text foreground color converter to every cell of the column.

For example in dependency of converter rules sametime text in column's cells i black and sometime is red.

0 Votes 0 · ·

Hi, In UWP's DataGrid, this may not be possible. The Converter is usually performed at the same time as the binding, but if you create the binding of the text and DataGridTextColumn.Foreground, an exception will occur.

0 Votes 0 · ·

Hello, if you have other questions, please feel free to ask

0 Votes 0 · ·

Hi, did you solve the problem you encountered?

0 Votes 0 · ·

0 Answers