leocb / MaterialSkin

Theming .NET WinForms, C# or VB.Net, to Google's Material Design Principles.
MIT License
437 stars 132 forks source link

Cross-thread exception when moving a parent control #322

Open ainwood opened 2 years ago

ainwood commented 2 years ago

I documented this issue here: https://stackoverflow.com/questions/70615790/materialskin-cross-thread-operation-not-valid-despite-delegate

MaterialButton is right-docked to a MaterialCard, which in-turn sits in a TableLayoutPanel. When trying to change the ColumnSpan of the MaterialCard from a work thread, I invoke a delegate to avoid a cross-thread exception, but I get one anyway. Doesn't happen with the other (WinForms) child controls in the MaterialCard.