iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I have a project that is using webdesktop and I have added a background image to the desktop.
The problem is the the image is getting stretched based on the screen resolution.
Is there a way to tell the desktop to not stretch the image and to leave the aspect ratio alone?
Thanks.
Following snippet code shows how to add background image in WebDesktopManager.
<ISWebDesktop:WebDesktopManager ID="WebDesktopManager1" runat="server" Height="100%" Width="100%" ShortcutIconsVisible="True" EnableContextMenu="true"> <ImagesSettings OverlayBackground="../images/aqua_images/aqua_bg.jpg" /> ... </ISWebDesktop:WebDesktopManager>
By default, the background image will rendered as img element such as shown below:
<img style="width: 100%; height: 100%; position: absolute;" src="../images/aqua_images/aqua_bg.jpg">
Using DOM Explorer, this element is the firstChild of WebDesktopManager. We can use OnInitialize client-side event to manipulate this element. For example: removes its height and width style to prevent the background image stretched based on the screen resolution. Thus the size of the image will be as-is.
function WebDesktopManager1_OnInitialize(controlId) { var WebDesktopManager1 = ISGetObject(controlId); WebDesktopManager1.GetFrameElement().firstChild.style.height = ""; WebDesktopManager1.GetFrameElement().firstChild.style.width = ""; return true; }
Hope this helps.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname