MaterialSkin icon indicating copy to clipboard operation
MaterialSkin copied to clipboard

Added ability to create a custom theme

Open lukaszmn opened this issue 5 years ago • 2 comments

Originally, MaterialSkinManager accepted either a light or dark theme, both being predefined. There was no option to customize the themes or have a different background color of the window (none that I'm aware of).

I added the ability to customize an existing theme or create a new one, together with an easy mechanism for switching themes.

I'm not very content of the circular dependency:

materialSkinManager.Theme = new ThemeLight(materialSkinManager);

but I added it to keep the existing behavior.

I was also wondering whether BackdropBrush is correctly set - in both cases it was set to a brush from BackgroundColor instead of BackdropColor. Let me know.

Thanks

lukaszmn avatar Mar 15 '20 00:03 lukaszmn

Holy crap, awesome work, thanks!

I'll check it out on Monday or Thursday, and approve it then.

I don't remember if the backdrop should be same as the background, I'll take a look

leocb avatar Mar 15 '20 06:03 leocb

I would love to if the actual class just gave us the ability to provide System.Drawing.Bitmap instances (from System.Drawing.Common) that we can create and then paint to using System.Drawing.Graphics so we do not have to embed resources into the actual program.

I even do that one myself on one of my programs and expect things (up to and including TextBox's and everything to be dark, but I plan to make it per icon shown on all the program windows where the icon that is black triggers dark theme, the pink icon triggers pink theme, and the orange icon triggers orange theme). However doing it manually made it almost impossible because on net472 it renders properly, however on .NET 5 and 6 it renders incorrectly only on a single form. 😭

AraHaan avatar Jul 06 '21 20:07 AraHaan