Export (0) Print
Expand All

Panel.OnRender Method

Draws the content of a DrawingContext object during the render pass of a Panel element.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

abstract OnRender : 
        dc:DrawingContext -> unit 
override OnRender : 
        dc:DrawingContext -> unit 

Parameters

dc
Type: System.Windows.Media.DrawingContext
The DrawingContext object to draw.

This example shows how to override the OnRender method of Panel in order to add custom graphical effects to a layout element.

Use the OnRender method in order to add graphical effects to a rendered panel element. For example, you can use this method to add custom border or background effects. A DrawingContext object is passed as an argument, which provides methods for drawing shapes, text, images, or videos. As a result, this method is useful for customization of a panel object.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.

Community Additions

ADD
Show:
© 2014 Microsoft