/// <summary> /// Initializes container with gantt items. Container listens on ganttItems collection changes and updates itself. /// </summary> /// <param name="?"></param> public void Initialize(ObservableCollection <IGanttItem> ganttItems, GanttGlyphPanel glyphPanel) { Debug.Assert(ganttItems != null); // Initialize collection of visual childs. _CreateVisuals(ganttItems); _ganttItems = ganttItems; // Initialize Glyph panel. _glyphPanel = glyphPanel; // Listen events from ganttItems collection: Add, Remove, Reset and handle them adding, removing corresponding visuals. ganttItems.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(_GanttItemsCollectionChanged); }
/// <summary> /// Initializes container with gantt items. Container listens on ganttItems collection changes and updates itself. /// </summary> /// <param name="?"></param> public void Initialize(ObservableCollection<IGanttItem> ganttItems, GanttGlyphPanel glyphPanel) { Debug.Assert(ganttItems != null); // Initialize collection of visual childs. _CreateVisuals(ganttItems); _ganttItems = ganttItems; // Initialize Glyph panel. _glyphPanel = glyphPanel; // Listen events from ganttItems collection: Add, Remove, Reset and handle them adding, removing corresponding visuals. ganttItems.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(_GanttItemsCollectionChanged); }