locked
Clipping with path Geometry in windows 8

    Question

  • I tried to port the app for magazine page animation created for windows phone(http://sigurdsnorteland.wordpress.com/2011/03/29/tinyapps-pageturner7/). I ported all the code except the clipping logic. In the windows phone version of code, they are using PathGeometry for clipping the image slide. But in windows 8 i only found RectangleGeometry for clipping. How i can achieve PathGeometry clipping or similar functionality in windows 8.1. You can find the sample code of page flip from here (https://onedrive.live.com/?cid=fe8de857c07b25f7&id=FE8DE857C07B25F7!7372&authkey=!ADhcVhoKdCskrzw). Anyone please help me, i am badly need this to be done within two days.

    If it is not possible, What is the alternative to implement magazine page flip like functionality in WinRT. If anyone tried this please help me.

    At lease a sliding animation on mouse tap is require in case of no alternatives. I tried for a solution to this for past couple of weeks but failed. So please please help me. 

    Monday, April 07, 2014 3:24 PM

Answers

  • As you found, clipping to arbitrary shapes is not supported. Only clipping to rectangles is supported.

    If you are trying to clip an image you can fill your Path with the image rather than clipping.

    For your sliding animation you can use blend to create an animation to translate the position, shrink, etc. Also look at the FlipView control which does essentially the same concept by using a ScrollViewer and setting marks for the different pages.

    --Rob


    Monday, April 07, 2014 3:31 PM
    Owner