New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
How to Initially Zoom the Loaded Image to Best Fit
How to
Zoom the image loaded in RadImageEditor to best fit the editable area of the control. on initial load.
Solution
In order to zoom to best fit the loaded image, you can attach a handler to the ImageEditor's client-side ImageLoad event and call the controls zoomBestFit() method in it.
ASPX
<telerik:RadImageEditor ID="RadImageEditor1" runat="server" RenderMode="Lightweight" ImageUrl="~/Images/hay.jpg" Width="790" Height="430px" OnClientImageLoad="onImageLoad">
</telerik:RadImageEditor>
<script>
function onImageLoad(imageEditor, args) {
imageEditor.zoomBestFit();
}
</script>