BitmapImage bmp = new BitmapImage(); bmp.BeginInit(); bmp.UriSource = new Uri("pack://application:,,,/images/pic.png"); bmp.EndInit(); TransformedBitmap myRotatedBitmapSource = new TransformedBitmap(); myRotatedBitmapSource.BeginInit(); myRotatedBitmapSource.Source = bmp; myRotatedBitmapSource.Transform = new RotateTransform(90); myRotatedBitmapSource.EndInit(); image_box.Source = myRotatedBitmapSource;
Uri ur = new Uri(image_box.Source.ToString(), UriKind.Absolute); BitmapImage bmp = new BitmapImage(); bmp.BeginInit(); bmp.UriSource = ur; bmp.EndInit(); TransformedBitmap myRotatedBitmapSource = new TransformedBitmap(); myRotatedBitmapSource.BeginInit(); myRotatedBitmapSource.Source = bmp; myRotatedBitmapSource.Transform = new RotateTransform(90); myRotatedBitmapSource.EndInit(); image_box.Source = myRotatedBitmapSource;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)