예제 #1
0
        public void Deactivate()
        {
            if (!IsActive)
            {
                return;
            }

            IsActive = false;
            Preview.ContentPaddingCore = SavedContentPadding;
            Preview.FitToScreen(true);
            Preview.InvalidateVisual();
            Preview.ImageInfo.SuppressCalcLayout = false;
        }
예제 #2
0
        public void Activate()
        {
            if (IsActive)
            {
                return;
            }

            IsActive            = true;
            SavedContentPadding = Preview.ContentPadding;
            Width  = Preview.ImageInfo.ImageSize.Width;
            Height = Preview.ImageInfo.ImageSize.Height;
            Origin = new Point(Width / 2, Height / 2);
            Angle  = 0.0;
            Preview.ContentPaddingCore = ContentPadding;
            Preview.FitToScreen(true);
            UpdatePreview();
            LastDragPoint = InvalidDragPoint;
            SavedWidth    = double.PositiveInfinity;
            SavedHeight   = double.PositiveInfinity;
        }