mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-08 07:56:07 +02:00
Initial WPF content migrated (#17)
* 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
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
---
|
||||
title: "How to: Create a Reflection"
|
||||
ms.date: "03/30/2017"
|
||||
dev_langs:
|
||||
- "csharp"
|
||||
- "vb"
|
||||
helpviewer_keywords:
|
||||
- "creating reflections [WPF]"
|
||||
- "brushes [WPF], creating reflections"
|
||||
- "reflections [WPF], creating"
|
||||
ms.assetid: 4f017e16-ab80-43c7-98df-03b6bddbb203
|
||||
---
|
||||
# How to: Create a Reflection
|
||||
This example shows how to use a <xref:System.Windows.Media.VisualBrush> to create a reflection. Because a <xref:System.Windows.Media.VisualBrush> can display an existing visual, you can use this capability to produce interesting visual effects, such as reflections and magnification.
|
||||
|
||||
## Example
|
||||
The following example uses a <xref:System.Windows.Media.VisualBrush> to create a reflection of a <xref:System.Windows.Controls.Border> that contains several elements. The following illustration shows the output that this example produces.
|
||||
|
||||

|
||||
A reflected Visual object
|
||||
|
||||
[!code-csharp[visualbrush_markup_snip#GraphicsMMVisualBrushReflectionExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/visualbrush_markup_snip/CSharp/ReflectionExample.cs#graphicsmmvisualbrushreflectionexamplewholepage)]
|
||||
[!code-vb[visualbrush_markup_snip#GraphicsMMVisualBrushReflectionExampleWholePage](~/samples/snippets/visualbasic/VS_Snippets_Wpf/visualbrush_markup_snip/visualbasic/reflectionexample.vb#graphicsmmvisualbrushreflectionexamplewholepage)]
|
||||
[!code-xaml[visualbrush_markup_snip#GraphicsMMVisualBrushReflectionExampleWholePage](~/samples/snippets/xaml/VS_Snippets_Wpf/visualbrush_markup_snip/XAML/ReflectionExample.xaml#graphicsmmvisualbrushreflectionexamplewholepage)]
|
||||
|
||||
For the complete sample, which includes examples that show how to magnify parts of the screen and how to create reflections, see [VisualBrush Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Graphics/VisualBrush).
|
||||
|
||||
## See also
|
||||
|
||||
- <xref:System.Windows.Media.VisualBrush>
|
||||
- [Painting with Images, Drawings, and Visuals](painting-with-images-drawings-and-visuals.md)
|
||||
Reference in New Issue
Block a user