Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 127907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:33:04+00:00 2026-05-11T05:33:04+00:00

I am using the WPF Datagrid from Codeplex. I am able to style the

  • 0

I am using the WPF Datagrid from Codeplex.

I am able to style the rows and with the following attributes in the dg:DataGrid element.

But how do I style the Headers? I find 100s of examples on the web which define Styles and use e.g. x:Key=’DataGridColumnHeaderStyle’ in the Datagrid element, but none of them seem to work for me.

How can I just e.g. change the Datagrid Header background to orange on this DataGrid?

<dg:DataGrid AlternatingRowBackground='#ddd'      RowBackground='#eee'      Name='theGrid1'      VerticalAlignment='Stretch'      AutoGenerateColumns='False'      BorderBrush='#ddd'> ... </dg:DataGrid> 
  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T05:33:04+00:00Added an answer on May 11, 2026 at 5:33 am

    The style in this case is in a file called generic.xaml it should be loacted in a themems folder in your project.

    find it and open it. inside you will find this line that controls the background of the column headers

     <dg:DataGridHeaderBorder SortDirection='{TemplateBinding SortDirection}'                                      IsHovered='{TemplateBinding IsMouseOver}'                                      IsPressed='{TemplateBinding IsPressed}'                                      IsClickable='{TemplateBinding CanUserSort}'                                      Background='{TemplateBinding Background}'                                      BorderBrush='{TemplateBinding BorderBrush}'                                      BorderThickness='{TemplateBinding BorderThickness}'                                      Padding ='{TemplateBinding Padding}'                                      SeparatorVisibility='{TemplateBinding SeparatorVisibility}'                            SeparatorBrush='{TemplateBinding SeparatorBrush}'> 

    basically its defined at another place in the template: this will explain TemlateBinding to you MSDN TemplateBinding

    HTH, Eric

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a the WPF datagrid from the Microsoft CodePlex project. I have a
We're using the WPF DataGrid from the WPF Toolkit and are employing MVVM. I'm
When I run the following Northwind WPF Toolkit Datagrid code from this article ,
I am using the datagrid from WPF toolkit in a WPF windows application. It
I'm using the WPF DataGrid, and I'd like to know if there is any
Using WPF, I have a TreeView control that I want to set its ItemTemplate
Anyone using WPF for real LOB applications? We have all seen the clever demos
I'm building an application in C# using WPF. How can I bind to some
I have a situation where I am using wpf data binding and validation using
i wonder if it is possible to cascade converters when using wpf databinding. e.g.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.