mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-04 09:06:04 +02:00
* Reset branch for WPF changes * Convert BMP to PNG; fix link-out-of-scope err * Add snippets for WPF... 6794 files!!!! * Add missing snippets * update file updated between migration * Fix paths to include * update breadcrumb and toc * fix index links * fix index links * fix index links * fix markdown
1.6 KiB
1.6 KiB
title, ms.date, dev_langs, f1_keywords, helpviewer_keywords, ms.assetid
| title | ms.date | dev_langs | f1_keywords | helpviewer_keywords | ms.assetid | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| How to: Override the Panel OnRender Method | 03/30/2017 |
|
|
|
57397834-a085-4e36-90ab-416fad98f341 |
How to: Override the Panel OnRender Method
This example shows how to override the xref:System.Windows.Controls.Panel.OnRender%2A method of xref:System.Windows.Controls.Panel in order to add custom graphical effects to a layout element.
Example
Use the xref:System.Windows.Controls.Panel.OnRender%2A 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 xref:System.Windows.Media.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.
[!code-csharpLightWeightCustomPanel#1] [!code-vbLightWeightCustomPanel#1]