We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

PaletteGroupBar.Clear removes Palettes but not Controls

Hi, I have a PaletteGroupBar loaded with three symbol palettes. I am calling PaletteGroupBar.Clear() before loading a set of different Symbol Palettes into the Group Bar. The PaletteGroupBar.Controls collection still seems to contain the old palettes even after calling Clear(). However the PaletteGroupBar.PaletteCount property is 0 as expected. Is this the intended behaviour? This can be reproduced in the DiagramBuilder sample. I noticed this because I dynamically create a Symbol by iterating through the PaletteGroupBar.Controls collection, looking for a particular SymbolModel. After clearing the PaletteGroupBar and loading another set of Palettes, two symbols were created "on top of each other". This is because two SymbolModels with the same name were found. The first in the "old" Palette, which remained in the Controls collection, and the second in the "new" Palette, which is of course also in the Controls collection.

1 Reply

AD Administrator Syncfusion Team August 4, 2005 02:55 PM UTC

Hi Richard, You are right about the problem. It looks like calling PaletteGroupBar.Clear() merely hides the PaletteGroupView items contained in the GroupBar, and does not dispose off the controls. I don''t believe this is the design intent, and the PaletteGroupBar should ideally remove and dispose the PaletteGroupView control(s). I have logged a QA report, and we will do our best to fix the issue in a future update of the product. For the time being, please just clear the PaletteGroupBar.Controls collection immediately after you call PaletteGroupBar.Clear(). Thank you for bringing this issue to our attention. Regards, Prakash Surendra Syncfusion Inc.,

Loader.
Live Chat Icon For mobile
Up arrow icon