Beispiel #1
0
        private void ImageMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            CompressedImageControl img = (CompressedImageControl)sender;
            double width  = this.Width;
            double height = this.Height;

            if (img.Tag != null && ((int)img.Tag == 90 || (int)img.Tag == 270))
            {
                width  = this.Height;
                height = this.Width;
            }
            Visibility Visible = Visibility.Visible;

            if ((int)img.Width != (int)width)
            {
                img_Margin = img.Margin;
                img_width  = img.Width;
                img_height = img.Height;
                img.Margin = new Thickness(0, 0, 0, 0);
                img.Width  = width;
                img.Height = height;
                Visible    = Visibility.Hidden;
            }
            else
            {
                img.Margin = img_Margin;
                img.Width  = img_width;
                img.Height = img_height;
                Visible    = Visibility.Visible;
            }


            for (int i = 0; i < imgList.Count; i++)
            {
                if (imgList[i] != img)
                {
                    imgList[i].Visibility = Visible;
                }
            }
        }
Beispiel #2
0
        private void ImageMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            CompressedImageControl img = (CompressedImageControl)sender;
            double width  = this.Width;
            double height = this.Height;

            if (img.Tag != null && ((int)img.Tag == 90 || (int)img.Tag == 270))
            {
                width  = this.Height;
                height = this.Width;
            }
            if ((int)img.Width != (int)width)
            {
                adjustPos(Visibility.Hidden, img);
                img.Width  = width;
                img.Height = height;
            }
            else
            {
                adjustPos(Visibility.Visible, img);
            }
        }