Table of Contents

Class LegendBoxBase

Namespace
LightningChartLib.WinForms.Charting.Views
Assembly
LightningChart.WinForms.Charting.NET4.dll

LegendBox shows the series names and line/point styles in a box.

[TypeConverter(typeof(ExpandableObjectConverter))]
public class LegendBoxBase : DraggableObject, IChartNode, IDisposable, IHighlightingItem
Inheritance
LegendBoxBase
Implements
Derived
Inherited Members

Constructors

LegendBoxBase()

Constructor.

public LegendBoxBase()

LegendBoxBase(IChartNode)

Constructor.

public LegendBoxBase(IChartNode owner)

Parameters

owner IChartNode

Parent.

Properties

AllowResize

Allow resize by user interactive device.

public bool AllowResize { get; set; }

Property Value

bool

AutoSize

Automatic sizing based on contents.

public bool AutoSize { get; set; }

Property Value

bool

BorderColor

Border color.

public Color BorderColor { get; set; }

Property Value

Color

BorderType

Border type. Default is Outer.

public BorderType BorderType { get; set; }

Property Value

BorderType

BorderWidth

Border width.

public int BorderWidth { get; set; }

Property Value

int

CheckBoxBorderWidth

LegendBox checkbox border width.

public int CheckBoxBorderWidth { get; set; }

Property Value

int

CheckBoxColor

Checkbox color.

public Color CheckBoxColor { get; set; }

Property Value

Color

CheckBoxSize

LegendBox checkbox size in DIPs.

public int CheckBoxSize { get; set; }

Property Value

int

CheckMarkColor

Checkbox mark color.

public Color CheckMarkColor { get; set; }

Property Value

Color

CheckMarkStyle

LegendBox checkbox marker style.

public CheckmarkStyle CheckMarkStyle { get; set; }

Property Value

CheckmarkStyle

Fill

Fill.

public Fill Fill { get; set; }

Property Value

Fill

Height

Height. Applies when AutoSize is not used.

public int Height { get; set; }

Property Value

int

HighlightSeriesOnTitle

Highlight series, if user interactive device is over it or title on legend box.

public bool HighlightSeriesOnTitle { get; set; }

Property Value

bool

HighlightSeriesTitleColor

Highlighted series title color on legend box.

public Color HighlightSeriesTitleColor { get; set; }

Property Value

Color

Layout

LegendBox layout.

public LegendBoxLayout Layout { get; set; }

Property Value

LegendBoxLayout

MoveFromSeriesTitle

Allow LegendBox mouse events moving from series title. When enabled prevents raising events from the series title clicks (LegendBox mouse events are raised instead).

public bool MoveFromSeriesTitle { get; set; }

Property Value

bool

Offset

Offset from location calculated by Position property.

public PointIntXY Offset { get; set; }

Property Value

PointIntXY

ScrollBarVisibility

LegendBox scroll bar visibility setting.

public LegendBoxBase.LegendBoxScrollBarVisibility ScrollBarVisibility { get; set; }

Property Value

LegendBoxBase.LegendBoxScrollBarVisibility

SeriesTitleColor

Series title color.

public Color SeriesTitleColor { get; set; }

Property Value

Color

SeriesTitleFont

Series title font.

public Font SeriesTitleFont { get; set; }

Property Value

Font

Shadow

Shadow beneath the LegendBox.

public Shadow Shadow { get; set; }

Property Value

Shadow

ShowCheckboxes

Show checkboxes for selecting visibility of series.

public bool ShowCheckboxes { get; set; }

Property Value

bool

ShowIcons

Show icons.

public bool ShowIcons { get; set; }

Property Value

bool

UnitsColor

Units text color.

public Color UnitsColor { get; set; }

Property Value

Color

UnitsFont

Units text font.

public Font UnitsFont { get; set; }

Property Value

Font

UseSeriesTitlesColors

Use series title color. If false, uses Items color.

public bool UseSeriesTitlesColors { get; set; }

Property Value

bool

ValueLabelColor

Series value label color.

public Color ValueLabelColor { get; set; }

Property Value

Color

ValueLabelFont

Series value text font.

public Font ValueLabelFont { get; set; }

Property Value

Font

VerticalTitlesGap

Vertical gap (in DIPs) between LegendBox item titles when LegendBox has several rows.

public double VerticalTitlesGap { get; set; }

Property Value

double

Visible

Is LegendBox visible.

public bool Visible { get; set; }

Property Value

bool

Width

Width. Applies when AutoSize is not used.

public int Width { get; set; }

Property Value

int

Methods

CreateOffset()

Create offset.

protected virtual void CreateOffset()

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true if managed resources should be disposed, otherwise false.

GetLegendBoxInteractionDataAtMouseEvent()

Get interaction data of last mouse event.

public LegendBoxInteractionData GetLegendBoxInteractionDataAtMouseEvent()

Returns

LegendBoxInteractionData
returns M:LightningChartLib.WinForms.Charting.Views.LegendBoxBase.GetLegendBoxInteractionDataAtMouseEvent

GetRenderedRect()

Get rendered rectangle.

public RectangleXY GetRenderedRect()

Returns

RectangleXY

Rendered rectangle.

IsPositionOver(int, int, bool)

Is mouse over item.

public override bool IsPositionOver(int x, int y, bool useDIP = false)

Parameters

x int

Mouse X-coordinate. Units depend on useDIP parameter value.

y int

Mouse Y-coordinate.

useDIP bool

Use DIP instead of pixels as parameters.

Returns

bool

True if mouse is over item, false otherwise.

SetItemDragPosition(int, int, bool)

Set item drag end position

protected override void SetItemDragPosition(int x, int y, bool FinalPosition)

Parameters

x int
param x M:LightningChartLib.WinForms.Charting.Views.LegendBoxBase.SetItemDragPosition(System.Int32,System.Int32,System.Boolean)
y int
param y M:LightningChartLib.WinForms.Charting.Views.LegendBoxBase.SetItemDragPosition(System.Int32,System.Int32,System.Boolean)
FinalPosition bool
param FinalPosition M:LightningChartLib.WinForms.Charting.Views.LegendBoxBase.SetItemDragPosition(System.Int32,System.Int32,System.Boolean)

SetItemDragStartPosition()

Item draw position when dragging starts.

protected override void SetItemDragStartPosition()

SetProperCursor()

Set cursor.

public override void SetProperCursor()

ToString()

Convert class description to string.

public override string ToString()

Returns

string

Class description as a string.

Events

CheckBoxStateChanged

Occurs when the state of a series title check box has changed.

public virtual event LegendBoxBase.CheckBoxStateChangedHandler CheckBoxStateChanged

Event Type

LegendBoxBase.CheckBoxStateChangedHandler

SeriesTitleMouseClick

Occurs when a user interactive device button is clicked on a series title.

public virtual event LegendBoxBase.SeriesTitleUserActionEventHandler SeriesTitleMouseClick

Event Type

LegendBoxBase.SeriesTitleUserActionEventHandler

SeriesTitleMouseDoubleClick

Occurs when a mouse button is double-clicked on a series title.

public virtual event LegendBoxBase.SeriesTitleUserActionEventHandler SeriesTitleMouseDoubleClick

Event Type

LegendBoxBase.SeriesTitleUserActionEventHandler

SeriesTitleMouseDown

Occurs when a user interactive device is pressed down on a series title.

public virtual event LegendBoxBase.SeriesTitleUserActionEventHandler SeriesTitleMouseDown

Event Type

LegendBoxBase.SeriesTitleUserActionEventHandler

SeriesTitleMouseUp

Occurs when a user interactive device button is released over a series title.

public virtual event LegendBoxBase.SeriesTitleUserActionEventHandler SeriesTitleMouseUp

Event Type

LegendBoxBase.SeriesTitleUserActionEventHandler