Search code examples
c#silverlightcanvaschildren

Silverlight Canvas children collection changed


Is there a way to Catch if the childrencollection of a canvas in Silverlight has changed? (when a child is added or removed)

I know the ObservableCollection has such an event, how could i rase one for my Canvas?


Solution

  • The only responsibility of a Panel is setting the position and size of its children. This is done in MeasureOverride and ArrangeOverride, two somewhat 'pure' procedures. Inherit from ItemsControl to get more control.