Hello, Nate.
Now, the size of ImagePanel can not be changed without postback. So, you may use one of the following partial solutions:
1. To remove scroll bars you may use property named
ZoomMode into
PhotoEditorController and set it to
BestFit or
BestFitShrinkOnly.
In PhotoEditorSample application (which may be installed using link "Install PhotoEditor Sample Application")
you can do it making following changes into
\PhotoEditorSample\PhotoEditor\PhotoEditorSample.ascx file:
Code:<aur:PhotoEditorController ID="PhotoEditorController1" runat="server" QualityMeter="QualityMeter1"
ImagePanel="ImagePanel1" ShowExitMessage="True" CommandPanel="CommandPanel1">
</aur:PhotoEditorController>
replace to
Code:<aur:PhotoEditorController ID="PhotoEditorController1" runat="server" QualityMeter="QualityMeter1"
ImagePanel="ImagePanel1" ZoomMode="BestFit" ShowExitMessage="True" CommandPanel="CommandPanel1">
</aur:PhotoEditorController>
2. Try to set Width and Height of ImagePanel to maximum size of image. To do this make following steps:
a) Set property named
ViewportAlignment into
ImagePanel to
TopLeft.
b) Set property named
ZoomMode into
PhotoEditorController to
None.
c) Set property named
ResizingEnabled into
ImagePanel to
False.
d) Replace
Page_Load method in
Default.aspx:
from
Code:protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
PhotoEditorSample1.SourceImageFileName = MapPath("photo.jpg");
}
}
to
Code:protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
PhotoEditorSample1.SourceImageFileName = MapPath("photo.jpg");
Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(PhotoEditorSample1.SourceImageFileName);
PhotoEditorSample1.ImagePanel.BitmapViewer.Width =
PhotoEditorSample1.ImagePanel.BitmapViewer.Height = Math.Max(bitmap.Width, bitmap.Height);
}
}
e) Change css styles according to Theme and your design. At the minimum you should replace description of class
PhotoEditorSampleImagePanel:
from
Code:
.PhotoEditorSampleImagePanel
{
position:absolute;
top: 42px;
right: 10px;
}
to
Code:
.PhotoEditorSampleImagePanel
{
position:absolute;
top: 42px;
left: 250px;
}
Sincerely yours,
Sergey Peshekhonov.
Aurigma Technical Support Team.