protected override void CalcImageRect(Rectangle bounds)
        {
            //float zoomFactor = ((RepositoryItemZoomPictureEdit)Item).fZoomFactor;

            //Rectangle originRect = bounds;
            //bounds.Width = (int)Math.Round(bounds.Width * zoomFactor);
            //int horizIndent = (originRect.Width - bounds.Width) / 2;
            //bounds.X += horizIndent;

            //bounds.Height = (int)Math.Round(bounds.Height * zoomFactor);
            //int vertIndent = (originRect.Height - bounds.Height) / 2;
            //bounds.Y += vertIndent;

            //base.CalcImageRect(bounds);

            RepositoryItemZoomPictureEdit rep = (RepositoryItemZoomPictureEdit)Item;
            float     zoomFactor = rep.fZoomFactor;
            int       xIndent    = rep.XIndent - rep.MaximumXIndent / 2;
            int       yIndent    = rep.YIndent - rep.MaximumYIndent / 2;
            Rectangle originRect = bounds;

            bounds.Width = (int)Math.Round(originRect.Width * zoomFactor);
            int horizIndent = (originRect.Width - bounds.Width) / 2;

            bounds.X     += horizIndent - xIndent;
            bounds.Height = (int)Math.Round(originRect.Height * zoomFactor);
            int vertIndent = (originRect.Height - bounds.Height) / 2;

            bounds.Y += vertIndent - yIndent;
            base.CalcImageRect(bounds);
        }
 static ZoomPictureEdit()
 {
     RepositoryItemZoomPictureEdit.Register();
 }