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:
- Define two elements in your container: one for the front/visible side and one for the back/hidden side
- 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
- 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
2009-11-12 12:09:25
I should add that I've never tried this myself.
Mike Hodnick
2009-11-12 12:09:48
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
2009-11-12 18:44:19