MahApps / MahApps.Metro

A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
https://mahapps.com
MIT License
9.31k stars 2.45k forks source link

Individual row styling in datagrid #3726

Closed KKauK closed 4 years ago

KKauK commented 4 years ago

Hello,

I'm trying to do some individual row styling in my datagrid using a datatrigger (see attached screenshots). As soon as I use the MahApps datagrid styling the datatrigger won't work any more.

Please find attached a small test application (Just correct the MahApps reference). You can reproduce the behavior by uncommenting the following line in App.xaml:

ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml"

Screenshot not using Mahapps Screenshot using Mahapps WpfApp1.zip

timunie commented 4 years ago

Hi @KKauK , it runs for me if I change ItemContainerStyle to RowStyle. Can you try if this solves your issue? image

Just out of interest: Why do you want to make this? Is it for grouping the items?

Happy coding Tim

KKauK commented 4 years ago

Hi @Tim,

I simply missed that line! (sorry about). It fixes the issue!

The demand comes from our engineers, They have one data record in the dataset that has the same values for all properties and they don't want to adjust all of them. I'm personally not very lucky of that solution but as long as I can't offer a better way...

Thankx for the quick response and all the work you are doing!