--- 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 to create a reflection. Because a 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 to create a reflection of a that contains several elements. The following illustration shows the output that this example produces. ![A reflected Visual object](./media/graphicsmm-visualbrush-reflection-small.jpg "graphicsmm_visualbrush_reflection_small") 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 - - [Painting with Images, Drawings, and Visuals](painting-with-images-drawings-and-visuals.md)