HypernovaDesktop Components · docs
Binarymission
WinForms › Scroll Bar Marker › ScrollBarImageMark

ScrollBarImageMark

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.MarkerScrollBar

A small image on a marker scroll bar, centred on the position it marks – a bookmark flag, a breakpoint dot, a status icon.

public class ScrollBarImageMark : ScrollBarMarkBase

Inherits from / implements: ScrollBarMarkBase

Remarks

Set Image before the bar paints: an image mark without one makes the bar's painting fail.

Examples

chapterBar.ScrollBarMarks.Add(new ScrollBarImageMark
{
    Value = chapterStartLine,
    Image = Image.FromFile("icons\\bookmark-12.png"),
    SizingMode = ImageMarkSizingMode.Image,
    Alignment = ScrollBarMarkAlignment.Center,
    ToolTipInfo = "Chapter 4: Delivery terms",
});
chapterBar.Invalidate();

Members at a glance

Properties
ImageGets or sets the image drawn for the mark.
SizingModeGets or sets how the image's drawn size is chosen.

Properties

Image

public Image Image

Gets or sets the image drawn for the mark.

Value
Required: the default null makes the bar's painting fail while the mark is in its list.
Remarks

Drawn at the size SizingMode chooses, in pixels, not scaled with the display.

SizingMode

public ImageMarkSizingMode SizingMode

Gets or sets how the image's drawn size is chosen.

Value
The default is ImageMarkSizingMode.Image: the image's own size, cut down to fit the bar.