How does Silverlight work? [closed]

末鹿安然 提交于 2019-12-05 11:10:13

I haven't seen any info on the depth you are looking for. So, follow some bits I know.

How Silverlight runs depends on the browser plugin architecture. Take a look on the following links: http://blogs.msdn.com/b/jstegman/archive/2008/12/21/silverlight-browser-support.aspx http://kb.mozillazine.org/Plugin-container_and_out-of-process_plugins This link has a tiny bit about what you are asking (SL1): http://help.outlook.com/en-us/140/bb412366.aspx None of those links above dive the depth you are looking for.

All I know is that Silverlight plugin is a runtime environment, just like .net or the java vm.

The code written for a Silverlight app (c#, vb, f#) is compiled first, packed and compressed in a xap file

In IE Silverlight uses ActiveX technology. In other browsers it uses NPAPI.

Source code is not parsed/interpreted at runtime. A Silverlight app is in binary format, just like a regular .net app.

The xap file is the unit of deployment that contains binaries (dll) and content (xaml, images, ...). Visual Studio takes care of generating the xap for you. But you can do it all by yourself too. The xap extension is just a zip file renamed.

Once a xap file is received by the browser, the plugin kicks in and unpack and execute the app.

AppManifest.xaml (a file within the xap) tells the plugin which class is the entry point. When a Silverlight app is running, only the Xaml part of a UI control is parsed at runtime. Inputs are handled first by the browser and then by the plugin. In general, you don't care much about it, but it does have some consequences.

The Silverlight plugin is also able to render Xaml directly embeded within the Html.

The plug in is able to interact with the page and can expose object model to JavaScript, and the app can also invoke JavaScript functions and interact with DOM.

If designed for that, a Silverlight app can also run outside the browser.

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