private void ShowPicture_Executed(object sender, ExecutedRoutedEventArgs e) { var w = new BigPictureWindow(); w.PictureSource = ((Image) e.Parameter).Source; w.PictureUrl = (string) ((Image) e.Parameter).Tag; w.Show(); }
private void ShowPicture_Executed(object sender, ExecutedRoutedEventArgs e) { //throw new NotImplementedException(); //Image img = new Image(); //img.Source = ((Image) e.Parameter).Source; //BitmapImage imgAvatar = new BitmapImage(); //imgAvatar.BeginInit(); //string picUrl = e.Parameter.ToString(); //imgAvatar.UriSource = new Uri(picUrl); //imgAvatar.EndInit(); //img.Source = imgAvatar; BigPictureWindow w = new BigPictureWindow(); //w.WindowStyle = WindowStyle.ToolWindow; //w.WindowStartupLocation = WindowStartupLocation.CenterScreen; //w.Background = new SolidColorBrush(Colors.Black); //w.Width = SystemParameters.WorkArea.Width*0.9; //w.Height = SystemParameters.WorkArea.Height * 0.9; //w.Content = img; w.PictureSource = ((Image)e.Parameter).Source; w.PictureUrl = (string)((Image)e.Parameter).Tag; w.Show(); }