Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        /// <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);
        }
Пример #4
0
        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());
        }
Пример #5
0
        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());
        }
Пример #6
0
        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);
        }
Пример #7
0
 private void OnClickShowUserControl(object sender, RoutedEventArgs e)
 {
     LightBox.Show(this, new SampleDialog());
 }
Пример #8
0
 private void OnClickShowButton(object sender, RoutedEventArgs e)
 {
     LightBox.Show(this, new SampleDialog());
     MessageBox.Show("Hello.");
 }