I’ve had a few people ask how to use the Reflection control in code-behind instead of purely through xaml, so I decided to post a quick example here. There’s not much to it, but it may not be obvious at first, so…First, create an instance of Reflector (either via XAML or procedurally). Below, I’m creating an instance named ref1. Next, set the ReflectionTarget property to the object you wish to reflect (in my case, a Rectangle named ‘rectangleToReflect’). That’s it! I have a little extra code to set the margin and alignment properties of ref1, then I add it to my outermost Grid, ‘LayoutRoot’.     

Are you using the Reflection control in any of your projects? If so, send me a link or a screenshot and I’ll post it here.

private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
            // Create new Reflector object
            Reflector ref1 = new Reflector();
            // Set ReflectionTarget (the element to reflect)
            ref1.ReflectionTarget = rectangleToReflect;
            // Set a few layout properties
            ref1.Margin = new Thickness(50, 50, 0, 0);
            ref1.HorizontalAlignment = HorizontalAlignment.Left;
            ref1.VerticalAlignment = VerticalAlignment.Top;
            // Add reflection to LayoutRoot grid

Download Reflection Sample Project