Assembly: yWorks.yFilesWPF.Viewer (in yWorks.yFilesWPF.Viewer.dll) Version: 2.2.0.2 (2.2.0.2)
Syntax
| C# |
|---|
public abstract class AbstractPaintableStyleRenderer<TModelItem, TModelStyle, TStyle> : AbstractStyleRenderer<TModelItem, TModelStyle, TStyle>, IPaintable where TModelItem : class, IModelItem where TModelStyle : class, IVisualStyle<TModelItem> where TStyle : class, TModelStyle |
| Visual Basic |
|---|
Public MustInherit Class AbstractPaintableStyleRenderer(Of TModelItem As {Class, IModelItem}, TModelStyle As {Class, IVisualStyle(Of TModelItem)}, TStyle As {Class, TModelStyle}) _ Inherits AbstractStyleRenderer(Of TModelItem, TModelStyle, TStyle) _ Implements IPaintable |
Type Parameters
- TModelItem
- the type of item this renderer works on
- TModelStyle
- the basic class of the style that is associated with this kind of item
- TStyle
- the specific style interface used by style instances that return this renderer
Remarks
Subclasses need to implement the Paint(DrawingContext, IRenderContext) method, and the CreateRenderStateTag(IRenderContext), IsRenderStateValid(IRenderContext, Object), and UpdateRenderStateTag(IRenderContext, Object) methods, only. The CreateVisual(IRenderContext) and UpdateVisual(IRenderContext, Visual) implementation provided by this class will delegate to that paint method depending on whether the current rendering is still valid.
As an example the following type declaration would make sense
for a new style called MyFunnyNodeStyle : INodeStyle:
CopyC#public class MyFunnyNodeStyleRenderer : AbstractPaintableStyleRenderer<INode, INodeStyle, MyFunnyNodeStyle> { ...
Inheritance Hierarchy
yWorks.yFiles.UI.Drawing..::..AbstractStyleRenderer<(Of <(<'TModelItem, TModelStyle, TStyle>)>)>
yWorks.yFiles.UI.Drawing..::..AbstractPaintableStyleRenderer<(Of <(<'TModelItem, TModelStyle, TStyle>)>)>
yWorks.yFiles.UI.Drawing..::..AbstractPaintableNodeStyleRenderer<(Of <(<'TStyle>)>)>