r/ProgrammerHumor • • Jul 20 '17

What people think coding is...

Post image
35.4k Upvotes

811 comments sorted by

View all comments

Show parent comments

8

u/BlahYourHamster Jul 20 '17

You're not alone. Overriding styles and templates is a truly harrowing experience in WPF, especially if you're trying to restyle a more complex control like a DataGrid.

1

u/DigitalShards Jul 21 '17

The DataGrid styling actually wasn't too bad, but that's probably because I wasn't getting too complicated with it.

But I just spent most of the day trying to get data validation working - wanted a "Save" button to be disabled if any of the controls on the page had errors. Got that working, but the error messages went away. Got the error messages back, but half the controls wouldn't re-validate if the user changed the data. Got that working, and all the custom styling went back to default. Fix the styling, and the error message text went away.

Finally got it working, and sat there putting data in and out of boxes to make the "Save" button enable and disable itself and the error messages show up and go away. I'm not convinced it'll still work tomorrow.