Hi everyone,
WPF project + C#.
In a StackPanel I have an Image that fills it.
At runtime I need to load a bitmap, rotate it and put in the Image control and fill it.
My code is:
BitmapImage bi = new BitmapImage(new Uri(modellino.image1, UriKind.RelativeOrAbsolute));
imgDescrizione.LayoutTransform = new RotateTransform(90);
imgDescrizione.Source = bi;
But in this way I'm able to rotate the image but its size is the one that fits not rotated the panel.
How can i solve it?
Thanks