public override UIElement GenerateGlyph(WpfHexViewLine line, HexGlyphTag tag) { var glyphTag = tag as HexImageReferenceTag; if (glyphTag == null) return null; const double DEFAULT_IMAGE_LENGTH = 16; const double EXTRA_LENGTH = 2; double imageLength = Math.Min(DEFAULT_IMAGE_LENGTH, line.Height + EXTRA_LENGTH); var image = new DsImage { Width = imageLength, Height = imageLength, ImageReference = glyphTag.ImageReference, }; Panel.SetZIndex(image, glyphTag.ZIndex); return image; }
/// <summary> /// Generates a glyph or returns null /// </summary> /// <param name="line">Line</param> /// <param name="tag">Tag</param> /// <returns></returns> public abstract UIElement GenerateGlyph(WpfHexViewLine line, HexGlyphTag tag);