开发者

Silverlight Planeprojection

开发者 https://www.devze.com 2022-12-11 18:41 出处:网络
I have a user control that has a white background with a Zindex = 0.I also have an image on 开发者_如何学Gotop of the white background with a Zindex = 10.When I use planeprojection to flip the image 1

I have a user control that has a white background with a Zindex = 0. I also have an image on 开发者_如何学Gotop 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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号