XBAP 只能占用浏览器屏幕的一部分吗?

发布于 2024-09-27 07:50:32 字数 155 浏览 1 评论 0原文

我知道使用 Silverlight,您可以控制网页中 Silverlight 部分的宽度和高度。然而,据我所知,当您使用 XBAP 时,您似乎将整个浏览器页面区域交给了 WPF。有没有办法让 HTML 并将 XBAP 嵌入该 HTML 页面的矩形内?或者这只能通过 Silverlight 实现?

I know with Silverlight you can control the width and height of the Silverlight section within the web page. However, it seems like from what I can tell when you are using XBAP you give the entire browser page area over to WPF. Is there a way to have an HTML and have XBAP be embedded within a rectangle of that HTML page? Or is this only possible with Silverlight?

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

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

发布评论

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

评论(2

心不设防 2024-10-04 07:50:32

我没有尝试过,但您可能可以将 Xbap 托管在 iFrame 中。

I haven't tried, but you could probably host the Xbap in an iFrame.

白鸥掠海 2024-10-04 07:50:32

如果您设置页面的宽度高度,则可以控制其大小。使用以下默认生成的 XAML,运行它并使用 WidthHeight

<Page   x:Class="WpfBrowserApplication1.Page1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        mc:Ignorable="d" 
        d:DesignHeight="300" d:DesignWidth="300"
        Title="Page1"
        Width="400"
        Height="400"
        >
    <Grid Background="Red">

    </Grid>
</Page>

If you set the Width and Height of the page you can control its size. Using the following default generated XAML, run it and have a play with the Width and Height:

<Page   x:Class="WpfBrowserApplication1.Page1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        mc:Ignorable="d" 
        d:DesignHeight="300" d:DesignWidth="300"
        Title="Page1"
        Width="400"
        Height="400"
        >
    <Grid Background="Red">

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