Jeremy
Jeremy

Reputation: 46420

silverlight: reflection effect

I've seen examples in silverlight where the achieve a effect using 1 of 2 ways:

  1. Two image objects, both displaying the same image, but the bottom one rotating it 180 degrees and applying a gradient image opacity
  2. A MediaElement object and a VideoBrush element.

I have a series of path objects, rectanges, etc which I would like to apply a reflection affect to. Is there a more elegant solution other than copying my objects manually and rotating them? Unfortunately the VideoBrush object only works on MediaElement objects, but is there something else I can use?

Upvotes: 1

Views: 2193

Answers (2)

Bill Reiss
Bill Reiss

Reputation: 3460

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

Upvotes: 3

Related Questions