public Page1() { InitializeComponent(); } private void button1_Click(object sender, RoutedEventArgs e) { Image i = new Image(); BitmapImage src = new BitmapImage(); src.BeginInit(); src.UriSource = new Uri("book1.png", UriKind.Relative); src.CacheOption = BitmapCacheOption.OnLoad; image1.Source = src; image1.Stretch = Stretch.Uniform; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)