aspx 页面中的 Silverlight 对象 - 不占用整个页面空间

发布于 2024-12-21 05:38:50 字数 2440 浏览 0 评论 0原文

在我的 aspx 页面中,我正在创建两个 .在第一个面板中,我使用 aspx 菜单,在第二个面板中,添加 Silverlight 对象。但我可以看到在浏览器底部有一个高度为 100px(大约)的空白区域。为什么要添加这个空间?如何删除该空间?

提前致谢。

示例代码:

<asp:Panel ID="pnlMenu" runat="server">
        <table width="100%">
            <tr>
                <td>                                             
                    <img id="imgLogo" alt="no image" style="float:left;display:none;height:20px; width:90px;"  />                        
                </td>
                <td>
                    <img src="sample.png" alt="no image" style="float: right" />
                </td>
            </tr>
            <tr>
                <td>
                    Code to add menu
                </td>
            </tr>
        </table>
</asp:Panel>
<asp:Panel ID="silverlightControlHost" runat="server" ClientIDMode="Static">
    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2"
        width="100%" name="silverlight1" id="SLobj" style="margin: 0px; padding: 0px;">
        <param name="source" value="Sample.xap" />
        <param name="onerror" value="onSilverlightError" />
        <param name="background" value="white" />
        <param name="initparams" value="clientip=<%= Request.UserHostAddress %>, username=<%= HttpContext.Current.User.Identity.Name %>, StartupMode=HTML" />
        <param name="minRuntimeVersion" value="4.0.50401.0" />
        <param name="autoUpgrade" value="true" />
        <param name="onLoad" value="SilverlightpluginLoaded" />
        <param name="culture" value="<%= System.Threading.Thread.CurrentThread.CurrentCulture.Name %>" />
        <param name="windowless" value="true" />
        <param name="uiculture" value="<%= System.Threading.Thread.CurrentThread.CurrentUICulture.Name %>" />
        <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration: none;">
            <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight"
                style="border-style: none" />
        </a>
    </object>
    <iframe id="_sl_historyFrame" style='visibility: hidden; height: 0; width: 0; border: 0px'>
    </iframe>
</asp:Panel>

In my aspx page, i am creating two . In the first one, am using aspx menu and in second panel, adding the Silverlight object. But i can see that at the bottom of browser, there is an Empty space of height 100px(approx). Why this space getting added? How to remove that space?

Thanx in advance.

Sample code:

<asp:Panel ID="pnlMenu" runat="server">
        <table width="100%">
            <tr>
                <td>                                             
                    <img id="imgLogo" alt="no image" style="float:left;display:none;height:20px; width:90px;"  />                        
                </td>
                <td>
                    <img src="sample.png" alt="no image" style="float: right" />
                </td>
            </tr>
            <tr>
                <td>
                    Code to add menu
                </td>
            </tr>
        </table>
</asp:Panel>
<asp:Panel ID="silverlightControlHost" runat="server" ClientIDMode="Static">
    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2"
        width="100%" name="silverlight1" id="SLobj" style="margin: 0px; padding: 0px;">
        <param name="source" value="Sample.xap" />
        <param name="onerror" value="onSilverlightError" />
        <param name="background" value="white" />
        <param name="initparams" value="clientip=<%= Request.UserHostAddress %>, username=<%= HttpContext.Current.User.Identity.Name %>, StartupMode=HTML" />
        <param name="minRuntimeVersion" value="4.0.50401.0" />
        <param name="autoUpgrade" value="true" />
        <param name="onLoad" value="SilverlightpluginLoaded" />
        <param name="culture" value="<%= System.Threading.Thread.CurrentThread.CurrentCulture.Name %>" />
        <param name="windowless" value="true" />
        <param name="uiculture" value="<%= System.Threading.Thread.CurrentThread.CurrentUICulture.Name %>" />
        <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration: none;">
            <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight"
                style="border-style: none" />
        </a>
    </object>
    <iframe id="_sl_historyFrame" style='visibility: hidden; height: 0; width: 0; border: 0px'>
    </iframe>
</asp:Panel>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

感情洁癖 2024-12-28 05:38:50

试试这些

透明的漂浮物。在表格末尾添加一个div,并将样式设置为“clear:both”
对于页面底部的iframe,去掉visibility:hidden样式并添加“display:none”

try these

Clear floats. Add a div at the end of the table and set style as "clear:both"
For the iframe at the bottom of the page, remove the visibility: hidden style and add "display:none"

桃气十足 2024-12-28 05:38:50

我认为你必须从 silverlight 应用程序设置高度和宽度。
尝试在 Silverlight 应用程序中设置高度和宽度。
就像下面的设置页面属性一样。

VerticalAlignment="拉伸" Horizo​​ntalAlignment="拉伸"

I think you have to set Height and Width from silverlight Application.
Try to set Height and Width in Silverlight Application.
Like Set Page Property of bellow.

VerticalAlignment="Stretch" HorizontalAlignment="Stretch"

莫言歌 2024-12-28 05:38:50

将 Height=100% 添加到对象标签。现在,它仅设置宽度。

Add Height=100% to the Object tag. Right now, it is setting only the width.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文