1234567891011121314151617181920212223242526272829 |
- 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);
- }
|