Version

Implementing a Custom Layer

To implement either a new layer or modify an existing layer, you must implement the ILayer interface. This interface exposes all the required properties and methods to implement a new layer.

All that is required to implement ILayer is to inherit from the ready-made base class, Layer, in the UltraChart.Core.Layers namespace. Custom Primitive processing logic is then added in an override of the FillSceneGraph method that will be called by the chart with a Scene Graph that the custom layer can add Primitives.

Plugging the custom layer into Chart requires the developer to provide and register an ILayer implementation with Chart, and associate it with a unique string ID. The string ID is added to the UserLayerIndex property of Chart, and this string ID must then be associated with the custom ILayer implementation as it is added to the Layer hashtable property on Chart at run-time.

In summary, the layer architecture of the rendering pipeline used by Chart empowers developers to extend and enhance existing chart types with application specific functionality. For further information and procedural assistance, developers should consult the Render Charts Using the Paint Element topic. Samples demonstrating working layers have also been included with the Infragistics product installation, and are invaluable for learning the degree of flexibility available when coding within FillSceneGraph.