0

This is my DataGridTemplateColumn

 DataGridTemplateColumn dgt = new DataGridTemplateColumn();

            dgt.CellTemplate = (System.Windows.DataTemplate)XamlReader.Load(@"<DataTemplate 
           xmlns='http://schemas.microsoft.com/client/2007' 
           xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>

          <CheckBox></CheckBox> </DataTemplate>");

How can i set the color in code behind? dgt. doesn't show any option for the Background or Foreground.

1 Answer 1

0

If someone needs the answer this is what i did:

<Grid Backgorund=""Green"">
  <CheckBox />
</Grid>

So instead of using "" use """""

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.