Using jQuery in WinForms desktop app?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 12:27:33

At the end of the day, it's just HTML markup in a browser, treat it as you would if you were working with a page to be viewed in any web browser. jQuery will work just fine assuming you can reference the library from the markup. This would require injecting a script reference into the markup at runtime.

You say that the source may reside on disk or be dynamically generated, I would introduce a pre-loaded step which either loads the file from disk, or generates the markup in memory, then (using string or XML manipulation), inject the jQuery reference and any associated scripts into the markup before populating the WebBrowser document. From there, just let the WebBrowser control do its job.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!