private void RotarImagen(Image control)
{
var biOriginal = (BitmapImage)control.Source;
var biRotated = new BitmapImage();
biRotated.BeginInit();
biRotated.UriSource = biOriginal.UriSource;
biRotated.Rotation = Rotation.Rotate270;
biRotated.EndInit();
control.Source = biRotated;
}
Puedes modificar el último método para rotar en otros ángulos ya que en este está definido el rotate a 270.. con un switch puedes cambiarlo, así:
private void RotarImagen(Image control, intRotation gradosvalue)
{
var biOriginal = (BitmapImage)control.Source;
var biRotated = new BitmapImage();
biRotated.BeginInit();
biRotated.UriSource = biOriginal.UriSource;
switch(grados)
{
case 0:
biRotated.Rotation = Rotation.Rotate0;
break;
case 180:
biRotated.Rotation = Rotation.Rotate180;
break;
case 270:
biRotated.Rotation = Rotation.Rotate270;
break;
case 90:
biRotated.Rotation = Rotation.Rotate90;
break;
}
value;
biRotated.EndInit();
control.Source = biRotated;
}