Silverlight Planeprojection

血红的双手。 提交于 2019-12-24 07:38:07

问题


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:


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



来源:https://stackoverflow.com/questions/1719746/silverlight-planeprojection

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!