c# - Rotate and flip an image -


i want flip image horizontally. occur when user clicks button. creating image in c# this:

image newimage = new image(); 

i tried:

scaletransform transform = new scaletransform(); transform.scaley = -1; selectedimage.rendertransform = transform;    //where selectedimage image want rotate. 

to flip it, nothing flip it. how can accomplish this?

something should work, based on use in universal windows platform app i'm working on, works me:

newimage.rendertransformorigin = new point { x = 0.5, y = 0.5 }; newimage.rendertransform = new scaletransform() { scaley = -1 }; newimage.updatelayout(); 

i think updatelayout key part here work think had same issue not updating , might have resolved it


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -