Reputation: 3
I have written app in silverlight which reads qr codes from webcam. I need to pass data (paste pure text) from silverlight to active field on page which contains silverlight, but not inside silverlight. Is there any way to do this? There is also restriction that user interacts by showing qrcode to webcam not actually clicking anything (problem with clipboard and silverlight - which can be used only in certian situations). Any suggestions or guidelines is welcome.
Upvotes: 0
Views: 80
Reputation: 6932
You can interact with the page hosting the Silverlight object. From Silverlight:
HtmlPage.Window.Eval(string.Format("processQrCode('{0}')", textData)
There should be javascript in the page:
function processQrCode(data) {
// Do something with the data here
}
Upvotes: 1