I have a grid filled with some data in my silverlight4 app.
I want to have “Show this as html” button for the grid.
I can generate the html, export it to savefile dialog, but that’s not what i need, because in this way user has to perform more actions, like:
- click ‘export’
- enter filename
- wait for download
- find file open it in browser
Is there any way to create tab, or window, or popup with certain html content in it? (so it would be like
- click ‘show as html’
?)
Thanks in advance,
Ilya.
The problem is that you can’t save it anywhere locally without user interaction (or elevated privileges)…. so don’t save it locally.
I can think of two options:
1.
To open another HTML browser window from Silverlight you can use HtmlWindow.Navigate specifying _blank as the target type.
2.
From Silverlight you can use ScriptObject.Invoke to execute arbitrary Javascript.