Home Forums WPF controls Xceed DataGrid for WPF Can I bypass Theme and just use Styles?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24987 |

    I want to programmatically assign a set of Styles to my DataGrid using something similar to this:
    TheXceedGrid.SetResourceReference(DataGridControl.StyleProperty, “BaselineStyle”);

    Do I have to use the TheXceedGrid.View.Theme or is that just a packaging class?

    Any help much appreciated.

    Imported from legacy forums. Posted by Rory (had 402 views)

    Xceed Support
    Member
    Post count: 5658

    You are not forced to go through Views and Themes…

    You can build a ResourceDictionary full of implicit styles for all of the elements of the DataGridControl and simply “merge” that dictionary to the DataGridControl’s ResourceDictionary.

    See MSDN documentation on MergedDictionaries for more details.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 223 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks for the reply Marc.

    So if I use the Xceed Custom Theme Project Template to generate the default XAML Styles, I should be able to then tweak them, wrap them up as a Resource Dictionary and then merge that dictionary in with any other resources that the DataGridControl is using?

    Something like this:
    <TheXceedGrid.Resources>
    <ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source=”myresourcedictionary.xaml”/>
    </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
    </TheXceedGrid.Resources>

    Imported from legacy forums. Posted by Rory (had 3147 views)

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