private void OnClickShowInGrid(object sender, RoutedEventArgs e) { var image = new Image(); image.Source = new BitmapImage(new Uri("Images/1.jpg", UriKind.Relative)); LightBox.Show(this.subGrid, image); }
private void Button_Click(object sender, RoutedEventArgs e) { var image = new Image(); image.Source = new BitmapImage(new Uri("Images/1.jpg", UriKind.Relative)); LightBox.Show(this, image); }
/// <summary> /// Show Thumnail /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ModImage_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { // show FrameworkElement. var image = new Image { Source = ModImage.Source }; LightBox.Show(this, image); }
private async void button_Click(object sender, RoutedEventArgs e) { LightBox.Show(this, new SampleDialog()); await Task.Delay(1000); LightBox.Show(this, new SampleDialog()); await Task.Delay(1000); LightBox.Show(this, new SampleDialog()); }
private async void button_Click(object sender, RoutedEventArgs e) { // 時間差で複数のダイアログ表示を続けて行う。 LightBox.Show(this, new SimpleDialog()); await Task.Delay(1000); LightBox.Show(this, new SimpleDialog()); await Task.Delay(1000); LightBox.Show(this, new SimpleDialog()); }
private void OnItemDoubleClicked(object sender, MouseEventArgs e) { var helper = new System.Windows.Interop.WindowInteropHelper(App.Current.MainWindow); var screen = System.Windows.Forms.Screen.FromHandle(helper.Handle); var height = screen.Bounds.Height; var path = this.lstPhoto.SelectedItem as Uri; var bmp = new BitmapImage(); bmp.BeginInit(); bmp.UriSource = path; bmp.DecodePixelHeight = height; bmp.EndInit(); var image = new Image() { Source = bmp }; LightBox.Show(this, image); }
private void OnClickShowUserControl(object sender, RoutedEventArgs e) { LightBox.Show(this, new SampleDialog()); }
private void OnClickShowButton(object sender, RoutedEventArgs e) { LightBox.Show(this, new SampleDialog()); MessageBox.Show("Hello."); }