Hopefully a simple question. I have a custom control with a dependency property that contains a list of another custom control.
public static readonly Dependenc
Ok Silly me there is alot of information about this all over the net, the simple solution is to take the generic freezablecollection and derive a none generic class as below.
public class BlockObjectCollection : FreezableCollection<BlockObject>
{
}
then replace the dependency properties
public static readonly DependencyProperty BlockObjectsProperty = DependencyProperty.Register("BlockObjects", typeof(BlockObjectCollection), typeof(Block), new FrameworkPropertyMetadata(new BlockObjectCollection(), null));
public BlockObjectCollection BlockObjects
{
get { return (BlockObjectCollection)base.GetValue(BlockObjectsProperty); }
set { base.SetValue(BlockObjectsProperty, value); }
}