An abstract base class that makes it possible to easily implement a custom INodeStyle.

Namespace: yWorks.yFiles.UI.Drawing
Assembly: yWorks.yFilesSilverlight.Viewer (in yWorks.yFilesSilverlight.Viewer.dll) Version: 2.4.0.0

Syntax

C#
public abstract class SimpleAbstractNodeStyle<TVisual> : INodeStyle, IVisualStyle<INode>, IModelItemInstaller<INode>, ICloneable where TVisual : FrameworkElement
Visual Basic
Public MustInherit Class SimpleAbstractNodeStyle(Of TVisual As FrameworkElement) _ Implements INodeStyle, IVisualStyle(Of INode), _ IModelItemInstaller(Of INode), ICloneable

Type Parameters

TVisual
The type of the visual this instance will create. Subclasses will probably declare a fixed type to make the implementation of CreateVisual(INode, IRenderContext) and UpdateVisual(INode, IRenderContext, TVisual) more convenient.

Remarks

The only method that needs to be implemented by subclasses is CreateVisual(INode, IRenderContext), however it is highly recommended to implement at least UpdateVisual(INode, IRenderContext, TVisual), too.

This implementation differs from the straightforward INodeStyle implementation in that there is no visible separation between the IVisualStyle<(Of <(<'TModelItem>)>)> and its IStyleRenderer<(Of <(<'TModelItem, TStyle>)>)>. Instead the renderer used by the base class is fixed and delegates all calls back to the style instance.

Related Demo Applications

The following programming samples are available: Also see the yFiles for Silverlight tutorials for step by step introductions.

Especially see the following tutorial steps:

Inheritance Hierarchy

System..::..Object
  yWorks.yFiles.UI.Drawing..::..SimpleAbstractNodeStyle<(Of <(<'TVisual>)>)>
    yWorks.yFiles.UI.Drawing..::..AbstractTableNodeStyle

See Also