getmusicbee.com

Support => Developers' Area => Skins => Topic started by: mythichelm on January 07, 2017, 06:00:41 PM

Title: How can I use current Music Bee Skin to theme new windows from plugins?
Post by: mythichelm on January 07, 2017, 06:00:41 PM
I'm working on a plugin that adds new windows, but the window is using the default skin for Windows Forms. How can I make the windows use the same style as the current Music Bee skin?
Title: Re: How can I use current Music Bee Skin to theme new windows from plugins?
Post by: Steven on January 07, 2017, 06:47:28 PM
by "add new windows" do you mean panels that show in the main application or do you mean a standalone window?

I assume its the later, so you can use:
Setting_GetSkinElementColor(0, ColorComponent.Background)

use Color.FromArgb() to convert the integer value to a color
Title: Re: How can I use current Music Bee Skin to theme new windows from plugins?
Post by: mythichelm on January 09, 2017, 06:27:01 AM
I was asking about a standalone window. That was exactly what I was looking for, Thanks!

My code:
this.ForeColor = Color.FromArgb(api.Setting_GetSkinElementColour(
                MusicBeePlugin.Plugin.SkinElement.SkinInputPanel,
                MusicBeePlugin.Plugin.ElementState.ElementStateDefault,
                MusicBeePlugin.Plugin.ElementComponent.ComponentForeground));