public static List<DataItemViewModel> CreateIntervallItems(DiagramViewModel parentViewModel, IEnumerable<DataItem> dataItems, int index, IntervalBarSeries intervalBarSeries)
        {
            List<DataItemViewModel> viewModels = new List<DataItemViewModel>();
            foreach (var item in dataItems)
            {
                viewModels.Add(new DataItemViewModel(parentViewModel, item, index, intervalBarSeries));
            }

            return viewModels;
        }
 public DataItemViewModel(DiagramViewModel parentViewModel, DataItem data, int index, IntervalBarSeries intervallBarSeries)
 {
     this.dataViewModels = new List<DataItemViewModel>();
     this.ParentViewModel = parentViewModel;
     this.Data = data;
     this.Index = index;
     this.intervallBarSeries = intervallBarSeries;
     this.Data.PropertyChanged += this.Data_PropertyChanged;
     this.Data.Children.CollectionChanged += this.Children_CollectionChanged;
     this.CreateView();
 }
        public ProjectDataViewModel(DiagramViewModel parentViewModel, ProjectData project, int index)
        {
            this.dataViewModels = new List<DataItemViewModel>();

            this.Index = index;
            this.Project = project;
            this.ParentViewModel = parentViewModel;

            this.Project.PropertyChanged += Project_PropertyChanged;
            this.Project.Data.CollectionChanged += Data_CollectionChanged;
            this.CreateView();
        }