• Windowless mode for Silverlight


    When you use windowless mode with the Silverlight plug-in, you are effectively telling the browser to render your Silverlight content directly, instead of giving the plug-in its own window for rendering. The main reason to use windowless mode is when you want your Silverlight content to blend with your HTML content, which the browser can do only when it is in charge of all the rendering. With windowless mode, you can layer Silverlight content on top of HTML content and HTML content on top of Silverlight content.

    注:Windowless 就是指plug-in没有自己的Render window,需要由浏览器直接进行Render。


    For example, you might want to display a map using HTML, but add a layer that uses Silverlight vector graphics in order to highlight certain features of the map. Of course, to create a Silverlight layer on top of HTML, you must use a transparent or translucent background both for the Silverlight plug-in, and for the content hosted within the plug-in (typically a UserControl).

    The overlay scenario works pretty well when you keep things simple. Unfortunately, when the browser has the responsibility of rendering the Silverlight content directly, there are numerous things that it cannot do, or cannot do well. Furthermore, some of the limitations depend on which browser is doing the rendering.

    The current documentation does contain a warning that windowless mode has a significant performance impact, which makes it unsuitable for complex animations and video playback. However, this limitation has not been sufficient to keep people away from windowless mode.

    I am not recommending that you avoid windowless mode entirely, but I do strongly recommend that you do not use it casually. For example, if you use it for special effect purposes (such as creating a non-rectangular Silverlight-based application on top of a complex HTML background), you should carefully consider whether the special effect is worthwhile given the limitations listed below.

    In some cases, you can achieve the desired special effect without using windowless mode, although it might take a little more work. For example, to achieve the effect of a non-rectangular Silverlight-based application, you can provide a UserControl background that blends seamlessly with your HTML background. (Of course, this is easier to achieve with solid-color backgrounds as opposed to backgrounds with complex images.)

    When you do use windowless mode, I also recommend that you test your code with a variety of platforms and browsers to make sure that your target audience is seeing what you expect.

    Now for the complete list of limitations, which I have added to the documentation for the next update. Please note that this is not a list of bugs that might be fixed in future versions of Silverlight. It is a list of limitations that would take considerable effort to work around. Therefore, you should not expect these limitations to disappear over time.

    Limitations of windowless mode for Silverlight:

    • Performance issues. Windowless mode is computationally expensive, especially in combination with a transparent plug-in background. For more information, see Performance Tips.
    • No support for passing mouse input to HTML content that the plug-in overlaps, even if the plug-in has a transparent background. To process mouse input through HTML, the HTML must overlap the Silverlight plug-in.
    • No mouse capture support outside the boundary of the plug-in.
    • No accessibility or IME support.
    • No support for windowless mode in full-screen mode.
    • No support for suppressing popup blockers when using hyperlink navigation to new windows. Note also that popup blocker suppression is not supported on Safari regardless of the windowing mode.
    • Issues due to browser and platform limitations:
    • Visual tearing in animation and video playback on Windows XP, on Windows Vista with DWM disabled, and in Internet Explorer, regardless of platform.
    • Unreliable rendering when overlapping HTML content in Safari.
    • Focus issues in Mozilla-based browsers. When the focus moves between the plug-in and other plug-ins or HTML controls, multiple controls will sometimes appear to have focus.

    注:DWM(Desktop Window Manager )uses the graphics processing unit (GPU) for desktop composition, certain applications may have to disable DWM for compatibility. Applications that take full control of the desktop, such as games that run in full-screen mode, must determine whether the DWM is enabled and if it is, disable it.

  • 相关阅读:
    Medium | LeetCode 179. 最大数 | 排序
    Medium | LeetCode 448. 找到所有数组中消失的数字 | 原地Hash
    Medium | LeetCode 78. 子集 | 回溯
    Medium | LeetCode 39. 组合总和 | 回溯
    js上传头像进行图片压缩
    js 点击按钮复制文本
    eclipse下载
    gulp打包修改配置文件
    vuejs之过滤器(filters)的使用
    关于layui弹出层关闭之后,弹出的dom显示问题
  • 原文地址:https://www.cnblogs.com/whyandinside/p/1532925.html
Copyright © 2020-2023  润新知