public GraphControlBase() { Items = new UIElementCollection(this, this); mInternalItems = new GraphControlItems(); AddLogicalChild(mInternalItems); AddVisualChild(mInternalItems); GraphItems = new GraphItemCollection(); SubscribeToItemsUpdating(GraphItems); mInternalItems.ItemsSource = GraphItems; DataContextChanged += (s, e) => { mInternalItems.DataContext = e.NewValue; }; }
public GraphControlBase() { Items = new UIElementCollection(this, this); mInternalItems = new GraphControlItems(); AddLogicalChild(mInternalItems); AddVisualChild(mInternalItems); GraphItems = new GraphItemCollection(); SubscribeToItemsUpdating(GraphItems); mInternalItems.ItemsSource = GraphItems; DataContextChanged += (s, e) => { mInternalItems.DataContext = e.NewValue; }; }