private void LoadMergedHeaders()
 {
     ObservableCollection<MergedHeader> mergedHeaders = DataGridControlBehaviors.GetMergedHeaders(SegmentsDataGrid);
     var vm = (SegmentMappingsChartViewModel) DataContext;
     mergedHeaders.Clear();
     if (vm.Categories.Count > 0)
     {
         mergedHeaders.Add(new MergedHeader {ColumnNames = {"Segment"}});
         foreach (SegmentCategoryViewModel category in vm.Categories)
         {
             var header = new MergedHeader {Title = category.Name};
             header.ColumnNames.AddRange(category.Segments.Select(s => s.StrRep));
             mergedHeaders.Add(header);
         }
     }
 }
        private void LoadMergedHeaders()
        {
            ObservableCollection <MergedHeader> mergedHeaders = DataGridControlBehaviors.GetMergedHeaders(SegmentsDataGrid);
            var vm = (SegmentMappingsTableViewModel)DataContext;

            mergedHeaders.Clear();
            if (vm.Categories.Count > 0)
            {
                mergedHeaders.Add(new MergedHeader {
                    ColumnNames = { "Segment" }
                });
                foreach (SegmentCategoryViewModel category in vm.Categories)
                {
                    var header = new MergedHeader {
                        Title = category.Name
                    };
                    header.ColumnNames.AddRange(category.Segments.Select(s => s.StrRep));
                    mergedHeaders.Add(header);
                }
            }
        }