Hi all,
I want to know, is it possible to resize an Image control according to the size of selected image, filled with, at run time?
Thanks! a lot for any reply...
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Usman ZafarPosted Dec 8, 2011, 8:45 PM
Benjamin KemnerPosted Jul 27, 2011, 2:54 AM
// load pic
Uri src = new Uri(@"/WpfPictureExport;component/Images/Chrysanthemum.jpg", UriKind.Relative);
BitmapImage img = new BitmapImage(src);
image2.Source = img;
// set the size of the control to picture
image2.Height = img.PixelHeight;
image2.Width = img.PixelWidth;