How do I set up my application to add a palette automatically when loaded?
How do I set up my application to add a palette automatically when loaded?
You can use the PaletteGroupBar's LoadPalette method to programmatically set up your application to load the desired palette. For example, in the QuickStart sample you could add the following code in the MainForm's Load event for the Electrical Symbols Palette that ships with Essential® Diagram to be automatically loaded when you run this application:
[C#]
private void MainForm_Load(object sender, System.EventArgs e) { this.paletteGroupBar.LoadPalette("C:\\Program Files\\Syncfusion\\Essential Suite\\2.0.5.0\\Diagram\\Symbol Palettes\\Electrical Symbols.edp"); }[VB.NET] Private Sub MainForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Me.paletteGroupBar.LoadPalette("C:\\Program Files\\Syncfusion\\Essential Suite\\2.0.5.0\\Diagram\\Symbol Palettes\\Electrical Symbols.edp") End Sub
Conclusion
I hope you enjoyed learning about how to set up your application to add a palette automatically when loaded.
You can refer to the WinForms Diagram feature tour page to learn about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WinForms Diagram example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!