What is the equivalent of OnRender in Silverlight?

Posted by John Weldon on Stack Overflow See other posts from Stack Overflow or by John Weldon
Published on 2010-03-16T05:39:47Z Indexed on 2010/03/16 5:46 UTC
Read the original article Hit count: 821

Filed under:
|
|

I'm working on porting an app from WPF to Silverlight.

The app uses custom types derived from FrameworkElement (in WPF) to describe shapes, and text to be rendered on a Canvas.

The WPF app root node overrides OnRender() to iterate through a collection of 'child' nodes, calling Render on each child node to build the Visual Tree.

Silverlight doesn't expose OnRender, but there are hints that the same effect can be achieved using ControlTemplate.

Is this the way to go, and are there any good examples of using this method available? I've done some googling (binging?) and found nothing really conclusive.

© Stack Overflow or respective owner

Related posts about silverlight-3.0

Related posts about wpf