leocb / MaterialSkin

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

Pre-processing icons for Drawer control causes NULL exception #197

Closed DoubleDebug closed 3 years ago

DoubleDebug commented 3 years ago

Is there a way to disable icon preprocessing for the drawer control in MaterialSkin2?

I'm using the .NET 4.7.2 framework and I'm getting an exception that's preventing me from running the application (image below). Also, the preprocessing doesn't work very well and just makes the icons look distorted.

preprocess

I've tried removing and re-adding the ImageList associated with the TabControl of the drawer and it didn't help. Edit: Forgot to mention, removing the icons from the TabControl fixes the issue. However, I still want to use icons.

orapps44 commented 3 years ago

Hi,

Icon preprocessing can't be disabled.

Are you using ImageKey or ImageIndex to set image for drawer ? I think only ImageKey works...

Do you use 24px images ?

DoubleDebug commented 3 years ago

Yes, I am using ImageKey. And no, my images are not 24px.

I tried using different image dimensions ranging from ~15px to ~800px and nothing seems to give a good result. I also tried messing with different transparency properties, but no luck either.

Anyway, thanks for the replies! I like using your UI framework despite these issues and I hope that the icon processing algorithm is improved one day. I will close this issue now since icon pre-processing cannot be disabled.

orapps44 commented 3 years ago

I'm using icons from google without issue : https://fonts.google.com/icons?selected=Material+Icons+Round:remove

Please try it.