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
How do I display a BitmapImage in the WebCoverFlow. I call a WCF service to get the images, so I do not have a hardcoded path to a static image. The images are returned as BitmapImages, so how to I display a BitmapImage in the control?
WebCoverFlowItem ImageSource property will accept BitmapImage object. Here is a snippet of WebCoverFlow creation using WebCoverFlowItem and ImageSource
String[] imgList = new String[]{"binfolder.jpg", "cal_ie.jpg", "designer_screenshot.jpg", "FF3_1_SchedulerMarch2009.png", "FFRoundedCombo.jpg", "firebug.jpg", "LIC-1.jpg", "SchedulerWeekView.png", "WebTreeViewAbout.jpg"}; foreach (String imgFile in imgList) { WebCoverFlowItem test1 = new WebCoverFlowItem(); test1.ImageSource = new BitmapImage(new Uri("images/" + imgFile, UriKind.Relative)); test1.ItemName = "Item" + index.ToString(); test1.Title = "Image #" + index.ToString() + " Title"; CoverFlow1.Items.Add(test1); index++; }
Does not work.
Care to elaborate why it does not work in your scenario? does the application returns error or the image does not show but there is no error?
Could you also give us some more information regarding the event you wish to bind the image?
I'm tried adding one image to the coverflow and it does not show up. The browser also throws an error when I click the Last button in the control (sort of like a Javascript error with the error icon appearing in the bottom left corner of the browser). I've attached a file with screenshots of the error (couldn't copy and paste the text).
I'm not using a Uri to set the image source. The BitmapImage is pulled in from a database and loaded into an Employee object. The BitmapImage is exposed via the Photo property. I'm positive the image loaded correctly because I can set the source of an Image control to the Photo property and it displays correctly.
Here's the source code:
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