public override void CreateCellContent(C1.WPF.FlexGrid.C1FlexGrid grid, Border bdr, C1.WPF.FlexGrid.CellRange range) { var col = grid.Columns[range.Column]; if (col.ColumnName == "ItemImage") { // create binding var b = new Binding(); b.Path = new PropertyPath("ItemType"); b.Converter = new MyImageConverter(); // create image, bind source property using new binding var img = new Image(); img.SetBinding(Image.SourceProperty, b); // assign to cell bdr.Child = img; } else { base.CreateCellContent(grid, bdr, range); } }
public override FrameworkElement CreateCell(C1.WPF.FlexGrid.C1FlexGrid grid, C1.WPF.FlexGrid.CellType cellType, C1.WPF.FlexGrid.CellRange range) { var cell = base.CreateCell(grid, cellType, range); if (cellType == C1.WPF.FlexGrid.CellType.ColumnHeader) { var tip = string.Format("This is the tooltip for column '{0}'.", grid.Columns[range.Column].ColumnName); cell.ToolTip = tip; } return(cell); }