I have designed a custom palette and exported it into its own .xml file using the Krypton Toolkit Palette Designer, and I would like my main's program's global palette to be set to this custom palette.
Currently, this is how I am applying the global palette to my main program.cs:
Program.LookAndFeel = new ComponentFactory.Krypton.Toolkit.KryptonManager();
Program.LookAndFeel.GlobalPalette = ComponentFactory.Krypton.Toolkit.KryptonManager.PaletteProfessionalSystem;
The idea is to replace the "PaletteProfessionalSystem" with my "CustomPalette". I was thinking of declaring my customPalette in its own C# class file, and do something like this:
public class CustomPalette : PaletteProfessionalSystem
{
public CustomPalette()
{
using (Stream stream = new FileStream("customPalette.xml", FileMode.Open))
{
// create new CustomPalette using stream
}
}
}
And updating my main program's global palette:
Program.LookAndFeel.GlobalPalette = new CustomPalette();
However, I am unsure as to how to create a new CustomPalette class from the .xml file. Any suggestions on how I could do this?