tags:

views:

97

answers:

1

I have a user control that has a white background with a Zindex = 0. I also have an image on top of the white background with a Zindex = 10. When I use planeprojection to flip the image 180 degrees on the X-axis it just shows my image in reverse. How would I get it to show the white background when it gets flipped?

+1  A: 

PlaneProjection inherently won't show the "back side" of a container. What you need to do:

  1. Define two elements in your container: one for the front/visible side and one for the back/hidden side
  2. When your PlaneProjection rotation is greater than 90 degrees, hide the front element, and show the back element. Vice-versa for switching back to < 90 degrees
  3. I believe you can use the VisualStateManager to intercept when the rotation angle hits a certain value and to then apply the visibility.

Here is a Tim Heurer article on the VSM: http://timheuer.com/blog/archive/2008/06/04/silverlight-introduces-visual-state-manager-vsm.aspx

Mike Hodnick
I should add that I've never tried this myself.
Mike Hodnick
This will work. You could also leave both element always Visible, just have the "back side" element a slightly offset on the Z axis, so that is is behind the "front side" of the element. That way you don't have to worry about keeping track of when to hide and show either element.
KeithMahoney