ratishphilip / wpfspark

A rich UserControl library to enhance the look and feel of WPF applications.
http://www.codeproject.com/Articles/1060961/WPFSpark-v
MIT License
549 stars 84 forks source link

How to Programmatically Remove Items #9

Closed IanSC closed 5 years ago

IanSC commented 5 years ago

Just a note to other users who might have difficulty in removing items. Took me a while to figure it out.

You have to remove it from both Children and FluidItems.

 panel.Children.Remove( itemToRemove );
 panel.FluidItems.Remove( itemToRemove );

If the 2nd one is not done, it will appear as if there's an "invisible" item occupying the previous spot.

Thanks to the author and contributors. It works great.