Silverlight: reflection effect

I've seen examples in silverlight where the effect is achieved using one of two ways:

  • Two image objects, both displaying the same image, but the bottom one rotates it 180 degrees and applying a gradient image Opacity
  • A MediaElement and a VideoBrush.

I have a series of path objects, transitions, etc. that I would like to apply reflection to. Is there a more elegant solution besides copying my objects manually and rotating? Unfortunately, the VideoBrush object only works with MediaElement objects, but is there something else I can use?

+1


source to share


2 answers


Not in Silverlight, in WPF you have a VisualBrush that can help with this, but Silverlight doesn't have one in version 2. Just to be clear, but this is not a twist, it's a negative ScaleY on a ScaleTransform. The simplest thing is to put everything in a UserControl and then use two UserControls with one ScaleTransform and an OpacityMask on it.



+3


source


For a good example, please see the following blog post from Mike Snow.



http://silverlight.net/blogs/msnow/archive/2008/09/04/silverlight-tip-of-the-day-36-how-to-create-reflections-and-shadows-for-images-and- text.aspx

+1


source







All Articles