How to save multiple symbol palettes in one edp file?
WinForms Diagram provides support to save the multiple symbol palettes in one edp file. Here, we have provided the sample to save the multiple Symbol Palettes in a single edp file.
The below-mentioned code sample is used for saving multiple Symbol Palettes:
Code Snippet:
saveFileDialog1.Filter = @"EDP file(*.edp)|*.edp";
if (saveFileDialog1.ShowDialog(this) == DialogResult.OK)
{
ObservableCollection<SymbolPalette> symbolpalettes = new ObservableCollection<SymbolPalette>();
foreach(GroupBarItem item in paletteGroupBar1.GroupBarItems)
{
symbolpalettes.Add(item.Tag as SymbolPalette);
}
string strSavePath = saveFileDialog1.FileName;
if (symbolpalettes!= null && symbolpalettes.Count > 0)
{
FileStream fStream = new FileStream(strSavePath, FileMode.OpenOrCreate, FileAccess.Write);
BinaryFormatter formatter = new BinaryFormatter();
formatter.Serialize(fStream, symbolpalettes);
fStream.Close();
}
}
Conclusion
I hope you enjoyed learning how to save multiple symbol palettes in one edp file.
You can refer to our WinForms Diagram feature tour page to learn about its other groundbreaking feature representations. You can also explore our WinForms Diagram documentation 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!