Table of Contents

Class ViewBase

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

View base class.

[TypeConverter(typeof(ExpandableObjectConverter))]
public abstract class ViewBase : ChartNode, IChartNode, IDisposable
Inheritance
ViewBase
Implements
Derived
Inherited Members

Constructors

ViewBase()

Protected constructor.

protected ViewBase()

ViewBase(LightningChart)

Constructor.

public ViewBase(LightningChart owner)

Parameters

owner LightningChart

Properties

CustomMessage

Custom message per view. Displayed on graph top left corner.

public string CustomMessage { get; set; }

Property Value

string

Margins

Margins between control's edges and for example graph area borders in DIPs. If using ViewXY AxisLayout.AutoAdjustMargins must be disabled this to apply.

public Padding Margins { get; set; }

Property Value

Padding

OwnerChart

Gets Owner chart of the view.

[Browsable(false)]
public LightningChart OwnerChart { get; }

Property Value

LightningChart

Methods

CalcMarginEffects()

Handler of margin / size based items. Should be called after either size or margins changes. Should update all values that depend on those.

protected virtual void CalcMarginEffects()

DeviceButtonClicked(UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, LightningChart)

user interactive device button has been clicked.

protected virtual bool DeviceButtonClicked(UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, LightningChart chart)

Parameters

eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
chart LightningChart

Returns

bool

DeviceButtonDoubleClicked(UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, LightningChart)

User interactive device button has been double clicked. For double click the behaviour is almost similar to single click, only raised event differs.

protected virtual bool DeviceButtonDoubleClicked(UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, LightningChart chart)

Parameters

eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
chart LightningChart

Returns

bool

DeviceButtonDown(UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, LightningChart)

User interactive device button has been pressed down.

protected virtual bool DeviceButtonDown(UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, LightningChart chart)

Parameters

eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
chart LightningChart

Returns

bool

DeviceButtonUp(UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, LightningChart)

User interactive device button has been released.

protected virtual bool DeviceButtonUp(UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, LightningChart chart)

Parameters

eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
chart LightningChart

Returns

bool

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.

GetZoomPadding()

Getter of the ZoomPadding, supported by Round and 3D Views ZoomPanOptions.

protected abstract Padding GetZoomPadding()

Returns

Padding

ZoomPadding of the given view, if supported.

HandleDeviceButtonClickedOnLegendBoxScrollBars(LegendBoxBase, UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, bool)

Occurs when a user interactive device button is clicked over the legend box scroll bars

protected bool HandleDeviceButtonClickedOnLegendBoxScrollBars(LegendBoxBase legendBox, UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, bool bIsOutsideGraphArea)

Parameters

legendBox LegendBoxBase
eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
bIsOutsideGraphArea bool

Returns

bool

HandleDeviceButtonDownAction(UserInteractiveDeviceEventArgs, bool, UserInteractiveObject)

Handle user interactive device button down.

protected virtual bool HandleDeviceButtonDownAction(UserInteractiveDeviceEventArgs eventArguments, bool bIsOutsideGraphArea, UserInteractiveObject item)

Parameters

eventArguments UserInteractiveDeviceEventArgs
bIsOutsideGraphArea bool
item UserInteractiveObject

Returns

bool

HandleDeviceButtonDownOnLegendBoxScrollBars(LegendBoxBase, UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, bool)

Occurs when a user interactive device button is down on the legend box scroll bars

protected bool HandleDeviceButtonDownOnLegendBoxScrollBars(LegendBoxBase legendBox, UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, bool bIsOutsideGraphArea)

Parameters

legendBox LegendBoxBase
eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
bIsOutsideGraphArea bool

Returns

bool

HandleDeviceButtonUpAction(UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, bool, ref bool, ref bool, UserInteractiveObject)

Handle user interactive device button up event.

protected virtual void HandleDeviceButtonUpAction(UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, bool bIsOutsideGraphArea, ref bool interactedObjectFirst, ref bool bExit, UserInteractiveObject item)

Parameters

eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
bIsOutsideGraphArea bool
interactedObjectFirst bool
bExit bool
item UserInteractiveObject

HandleDeviceButtonUpOnLegendBoxScrollBars(LegendBoxBase, UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, bool, ref bool, ref bool)

Occurs when a user interactive device button is up over the legend box scroll bars.

protected void HandleDeviceButtonUpOnLegendBoxScrollBars(LegendBoxBase legendBox, UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, bool bIsOutsideGraphArea, ref bool mousedObjectFirst, ref bool exit)

Parameters

legendBox LegendBoxBase
eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
bIsOutsideGraphArea bool
mousedObjectFirst bool
exit bool

HandleDeviceMoveAction(UserInteractiveDeviceEventArgs, bool, UserInteractiveObject)

Handle user interactive device move.

protected virtual bool HandleDeviceMoveAction(UserInteractiveDeviceEventArgs eventArguments, bool bIsOutsideGraphArea, UserInteractiveObject item)

Parameters

eventArguments UserInteractiveDeviceEventArgs
bIsOutsideGraphArea bool
item UserInteractiveObject

Returns

bool

HandleDeviceMoveOnLegendBoxScrollBars(LegendBoxBase, UserInteractiveDeviceEventArgs, bool)

Occurs when a user interactive device is moved over the legend box scroll bars

protected bool HandleDeviceMoveOnLegendBoxScrollBars(LegendBoxBase legendBox, UserInteractiveDeviceEventArgs eventArguments, bool bIsOutsideGraphArea)

Parameters

legendBox LegendBoxBase
eventArguments UserInteractiveDeviceEventArgs
bIsOutsideGraphArea bool

Returns

bool

HandleHorizontalScrollBarsDeviceButtonClicked(UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, bool)

Handle ScrollBar user interactive device button clicked event.

protected bool HandleHorizontalScrollBarsDeviceButtonClicked(UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, bool bIsOutsideGraphArea)

Parameters

eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
bIsOutsideGraphArea bool

Returns

bool

HandleHorizontalScrollBarsDeviceButtonDown(UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, bool)

Handle ScrollBar user interactive device button down event.

protected bool HandleHorizontalScrollBarsDeviceButtonDown(UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, bool bIsOutsideGraphArea)

Parameters

eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
bIsOutsideGraphArea bool

Returns

bool

HandleHorizontalScrollBarsDeviceButtonUp(UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, bool, ref bool, ref bool)

Handle horizontal scroll bars interactive device button up event.

protected void HandleHorizontalScrollBarsDeviceButtonUp(UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, bool bIsOutsideGraphArea, ref bool mousedObjectFirst, ref bool exit)

Parameters

eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
bIsOutsideGraphArea bool
mousedObjectFirst bool
exit bool

HandleHorizontalScrollBarsDeviceMove(UserInteractiveDeviceEventArgs, bool, UserInteractiveObject)

Handle ScrollBar user interactive device move on different views.

protected virtual bool HandleHorizontalScrollBarsDeviceMove(UserInteractiveDeviceEventArgs eventArguments, bool bIsOutsideGraphArea, UserInteractiveObject mibHandled)

Parameters

eventArguments UserInteractiveDeviceEventArgs
bIsOutsideGraphArea bool
mibHandled UserInteractiveObject

Returns

bool

HandleMarginsChanged()

Handle margins changed

protected virtual void HandleMarginsChanged()

HandleVerticalScrollBarsDeviceButtonClicked(UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, bool)

Occurs when vertical scroll bars were clicked by device button.

protected bool HandleVerticalScrollBarsDeviceButtonClicked(UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, bool bIsOutsideGraphArea)

Parameters

eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
bIsOutsideGraphArea bool

Returns

bool

HandleVerticalScrollBarsDeviceButtonDown(UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, bool)

Handle ScrollBar user interactive device button down event.

protected bool HandleVerticalScrollBarsDeviceButtonDown(UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, bool bIsOutsideGraphArea)

Parameters

eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
bIsOutsideGraphArea bool

Returns

bool

HandleVerticalScrollBarsDeviceButtonUp(UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, bool, ref bool, ref bool)

Handle vertical scroll bars user interactive device button up event.

protected void HandleVerticalScrollBarsDeviceButtonUp(UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, bool bIsOutsideGraphArea, ref bool mousedObjectFirst, ref bool exit)

Parameters

eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
bIsOutsideGraphArea bool
mousedObjectFirst bool
exit bool

HandleVerticalScrollBarsDeviceMove(UserInteractiveDeviceEventArgs, bool, UserInteractiveObject)

Handle vertical scroll bar user interactive device move on different views.

protected virtual bool HandleVerticalScrollBarsDeviceMove(UserInteractiveDeviceEventArgs eventArguments, bool bIsOutsideGraphArea, UserInteractiveObject mibHandled)

Parameters

eventArguments UserInteractiveDeviceEventArgs
bIsOutsideGraphArea bool
mibHandled UserInteractiveObject

Returns

bool

ItemListChanged(object, ListChangedEventArgs)

Render chart if item list changed.

protected virtual void ItemListChanged(object sender, ListChangedEventArgs e)

Parameters

sender object
e ListChangedEventArgs

MoveOnSameCoordinate(int, int)

Don't deal with mouse move if the coordinate has not changed. It causes massive CPU load when having lots of data and effect timer is running.

protected bool MoveOnSameCoordinate(int iMouseX, int iMouseY)

Parameters

iMouseX int
iMouseY int

Returns

bool

PositionOverGraph(CoordXY)

Check is position is over graph.

protected virtual bool PositionOverGraph(CoordXY coord)

Parameters

coord CoordXY

Returns

bool

SetInteractiveObjectToIdle(UserInteractiveObject)

Reset interactive object state to idle.

protected static void SetInteractiveObjectToIdle(UserInteractiveObject mib)

Parameters

mib UserInteractiveObject

UserInteractiveDeviceMoved(UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, LightningChart)

User interactive device has been moved.

protected virtual bool UserInteractiveDeviceMoved(UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, LightningChart chart)

Parameters

eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
chart LightningChart

Returns

bool

WheelScrolled(UserInteractiveDeviceEventArgs, LightningChart)

Mouse wheel has been scrolled.

public virtual bool WheelScrolled(UserInteractiveDeviceEventArgs eventArguments, LightningChart chart)

Parameters

eventArguments UserInteractiveDeviceEventArgs
chart LightningChart

Returns

bool

Events

MarginsChanged

Margins changed.

public event ViewBase.MarginsChangedEventHandler MarginsChanged

Event Type

ViewBase.MarginsChangedEventHandler