public IndexColumn(DataGrid dataGrid, int index) { Index = index; HeaderStringFormat = dataGrid.GetHeaderStringFormat(); HeaderTemplate = dataGrid.GetHeaderTemplate(); HeaderTemplateSelector = dataGrid.GetHeaderTemplateSelector(); //Bind(this, CellTemplateProperty, dataGrid, GetPath(CellTemplateProperty)); //Bind(this, CellTemplateSelectorProperty, dataGrid, GetPath(CellTemplateSelectorProperty)); //Bind(this, CellEditingTemplateProperty, dataGrid, GetPath(CellEditingTemplateProperty)); //Bind(this, CellEditingTemplateSelectorProperty, dataGrid, GetPath(CellEditingTemplateSelectorProperty)); CellTemplate = dataGrid.GetCellTemplate(); CellTemplateSelector = dataGrid.GetCellTemplateSelector(); CellEditingTemplate = dataGrid.GetCellEditingTemplate(); CellEditingTemplateSelector = dataGrid.GetCellEditingTemplateSelector(); }