using System.Windows.Media.Imaging; using InABox.Core; namespace InABox.DynamicGrid; public class DynamicImageColumn : DynamicActionColumn { public delegate BitmapImage? GetImageDelegate(CoreRow? row); public DynamicImageColumn(GetImageDelegate image, ActionDelegate? action = null) { Image = image; Action = action; VerticalHeader = true; } public DynamicImageColumn(BitmapImage image, ActionDelegate? action = null) { Image = r => image; Action = action; } public GetImageDelegate Image { get; protected set; } public bool AllowHeaderClick { get; set; } = false; public override object? Data(CoreRow? row) => Image?.Invoke(row); }