开发者

Can an XBAP only take up part of the browser screen?

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 ove开发者_JS百科r 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?


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


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜