UIElement.OnRender Method
When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.
Assembly: PresentationCore (in PresentationCore.dll)
abstract OnRender : drawingContext:DrawingContext -> unit override OnRender : drawingContext:DrawingContext -> unit
Parameters
- drawingContext
- Type: System.Windows.Media.DrawingContext
The drawing instructions for a specific element. This context is provided to the layout system.
This method has no default implementation in the UIElement class.
Notes to InheritorsThe OnRender method can be overridden to add further graphical elements (not previously defined in a logical tree) to a rendered element, such as effects or adorners. A DrawingContext object is passed as an argument, which provides methods for drawing shapes, text, images or videos.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.