Home Forums WPF controls Xceed DataGrid for WPF Applying Theme and changing Column Headers

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Mattd [Xceed]
    Post count: 8
    #25969 |

    Good morning Team,

    I am new to WPF and was wondering the following:

    1) In the Visual Studio template how do we assign one of the themes to the datagrid. It would have been nice to have created a basic form that showed it. Also it creates a class but there is nothing in it so what was it meant to do ?

    2) When a column is Read-Only I want to set the text color of the column header to another color than black. Is there a way to do this in XAML or C# or both ?

    Thanks…. Your control is awesome !

    Imported from legacy forums. Posted by Mathieu (had 2010 views)

    User (Old forums)
    Post count: 23064

    1) The theme can be applied from XAML or from code behind

    In XAML:

    <Window x:Class=”TestXceed.Window1″
    Title=”TestXceed” Height=”300″ Width=”300″

    <xcdg:DataGridControl x:Name=”TestGrid”>

    where Office2007Tutorial is the custom theme project. U need the class to be able to create an object of this theme project.

    In code-behind:

    TableView tableView = new TableView();
    Theme newTheme = new Office2007Tutorial.Office2007TutorialTheme();
    tableView.Theme = newTheme;
    TestGrid.View = tableView;

    where TestGrid is the name of ur grid

    2) I think you will have to modify the templates to achieve this. There is a tutorial in the documentation on how you could modify templates.. try looking through that to have a overview.

    Good luck! 🙂

    Imported from legacy forums. Posted by Serene (had 3392 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.