ResultViewerBase
Namespace: WealthLab.WPF
Parent: UserControl

The ResultViewerBase class is a UserControl descendant that is the base class for WL8 Performance Visualizers and Optimization Visualizers.

Descriptive Properties
DisableGlyphReverse
public virtual bool DisableGlyphReverse

WL8 will reverse a Viewer's GlyphResource image when it is operating in a Dark Theme. If you do not wish the image to be reversed in this manner, return true here.


GlyphResource
public virtual string GlyphResource

Return a string that describes an Embedded Resource in the .NET library for the image that should be used in the tab in WL8 for your Viewer. If you have an Embedded Resource named MyBitmap.png in the folder Images in your project named SomeCompany.WealthLabUtils, then the corresponding string would be: "SomeCompany.WealthLabUtils.Images.MyBitmap.png".


ViewerName
public virtual string ViewerName

Override this property to return the text that should appear in the tab in WL8 for your Viewer.



Initialization and Cleanup
Cleanup
public virtual void Cleanup()

WL8 calls this method when your Viewer is about to be unloaded from the host window. Perform any required cleanup here.


Initialize
public virtual void Initialize()

WL8 calls this method when your Viewer is first loading into the Strategy/Optimization window. Perform any required initialization here.



TeeChart Support
ChartSetup
public void ChartSetup(TChart chart)

This helper method sets up an instance of the TeeChart WPF charting component, establishing the proper background color for the selected theme, and setting the fonts and gridline colors to the standard ones used in WL8. If you wish to use TeeChart charting components in your Viewer, be sure to use the same package and version that's included in WL8, that is Steema.TeeChart.NETCore.WPF (4.2020.4.7).


CreateAreaSeries
public Area CreateAreaSeries(TChart chart, Color color, string title)

Creates and returns a TeeChart Area chart series. This is the type of chart used in WL8's Equity Curve and Drawdown Curve Visualizers.


CreateBarSeries
public Bar CreateBarSeries(TChart chart, Color color, string title)

Creates and returns a TeeChart Bar chart series. This is the type of chart used in WL8's Profit Distribution Visualizer.


CreateFastLineSeries
public FastLine CreateFastLineSeries(TChart chart, Color color, string title)

Creates and returns a TeeChart FastLine chart series. This is the type of chart used in NeuroLab's training graph.


CreatePieSeries
public Pie CreatePieSeries(TChart chart, Color color, string title)

Creates and returns a TeeChart Pie chart series. This is the type of chart used in WL8 PowerPack's Contribution Visualizer.


CreatePointSeries
public Points CreatePointsSeries(TChart chart, Color color, string title)

Creates and returns a TeeChart Point chart series. This is the type of series used in WL8 Power Pack's Analysis Series Visualizer.


ResetChartZoom
public void ResetChartZoom(TChart chart)

Call this method to cause the chart to reset to its unzoomed view, for example after the user zoomed into the chart with the mouse.