protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e) { base.OnPropertyChanged(e); if (e.Property.Name == "GanttColumnsItem" || e.Property.Name == "ItemsSource") { if (ItemsSource == null || GanttColumnsItem == null) { return; } foreach (var item in this.ItemsSource) { ColumnsGridPresenter col = this.ItemContainerGenerator.ContainerFromItem(item) as ColumnsGridPresenter; col.GanttProjectRow = item as GanttProjectModel; col.ItemsSource = GanttColumnsItem; } } }
protected override DependencyObject GetContainerForItemOverride() { ColumnsGridPresenter gridCell = new ColumnsGridPresenter(); return(gridCell); }