How to Add Dynamically Created Symbol Palette to PaletteGroupBar
29 Feb 2016 / 1 minute to read
The following code sample demonstrates how to add a dynamically created symbol palette to the PaletteGroupBar control.
//Create an instance of SymbolPalette.
SymbolPalette palette = new SymbolPalette("Palette");
//Add some nodes to the palette.
palette.AppendChild(new Ellipse(0, 0, 100, 100));
palette.AppendChild(new RoundRect(new RectangleF(0, 0, 100, 50),
MeasureUnits.Pixel));
palette.AppendChild(new LineConnector(PointF.Empty, new PointF(0,
100)));
//Add the palette to PaletteGroupBar.
paletteGroupBar1.AddPalette(palette);
'Create an instance of SymbolPalette.
Dim palette As SymbolPalette = New SymbolPalette("Palette")
'Add some nodes to the palette.
palette.AppendChild(New Ellipse(0, 0, 100, 100))
palette.AppendChild(New RoundRect(New RectangleF(0, 0, 100, 50),
MeasureUnits.Pixel))
palette.AppendChild(New LineConnector(PointF.Empty, New PointF(0,
100)))
'Add the palette to PaletteGroupBar.
paletteGroupBar1.AddPalette(palette)
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page