I'm creating a UI Design for my application in VB.Net with the help of HTML5 and CSS3 and Awesomium WebControl.
In my application I have to fetch binary data from a database and convert it to an Image Object and I have to show the Image in the application. The problem is that I want my UI Design to be full html and css and I don't know how to pass an Image Object in .NET to the Awesomium WebControl in a way that it show the image in html element.
Or in another way: For Example: How to pass my "My.Resources.MyImage" object to the Awesomium WebControl?
Dim img As System.Drawing.Image = My.Resources.MyImage
WebControl1. <----------- How To Pass The Object to the Control?
Thank you in advance.
Awesomium is actually designed exactly for scenarios such as this.
The best way to achieve this in 1.7 RC3 is by using a DataSource
and load your resource using the asset://
protocol. For application resources in particular, we've added a predefined ResourceDataSource
.
Check the WPF WebControlSample available with the SDK, for an example of usage.