Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
ResourceWasher overridden by DataRecordCellAreaStyle
posted

I have issues while adding the Metro-Theme to my application.

I'm using the ResourceWasher in MainWindow.xaml to change everything (for example: hover in the xamdatagrid) to the Metro-Look. I'm now trying to change the BackgroundColor of a single XamDataGrid-Row by adding a style targeting the DataRecordCellArea. Unfortunately it seems that the Style is overriding the ResourceWasher, hence the metro-hover gets changed to the default IG-hover....

How can I accomplish a clean inheritance of the Metro-Style to all controls without cutting the possibility to add styles?

MetroStyleInheritnaceTest.zip
  • 138253
    Offline posted

    Hello,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I modified the sample you attached, so now it works as you want. Basically I copied the whole Style for the DataRecordCellArea that is used in the Metro theme, because when you set the new one, the default one is overridden as you noticed.

     

    Feel free to write me if you have further questions.

    MetroStyle.zip