wpf 页面显示不出来

sl1264350023 2014-10-15 04:15:15

<UserControl x:Class="EGUC.View.WorkingView.UC.UCCENTER.UCIEHost"
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" Width="1024" Height="768">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid Height="32">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="80" />
<ColumnDefinition Width="80" />
<ColumnDefinition Width="100" />
</Grid.ColumnDefinitions>
<TextBox x:Name="urlBox" Grid.ColumnSpan="3" Background="White" />
<Button x:Name="btnGo"
Grid.Column="3"
Click="btnGo_Click"
Content="Go" />

</Grid>
<Grid Grid.Row="1" Width="1024" Height="736" ScrollViewer.HorizontalScrollBarVisibility="Visible">
<Grid Background="White">
<WebBrowser x:Name="browser" Margin="0" Source="http://www.baidu.com" Width="1024" Height="736"/>
</Grid>
</Grid>
</Grid>
</UserControl>



以上是显示的页面的代码,这个页面通过contentControl
<ContentControl Content="{Binding Shell_V2.ViewA3, Converter={StaticResource ViewConverter}}" Name="ContentControl3"/>

放入了window中,但是,在页面上看不到网页。通过snoop可以看到 百度网浮在最上层


这是snoop 3D的结构图


在2d下看不到那个百度页面。

是哪块的原因不显示?(整个window里有好多个contentcontrol)


...全文
677 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
sl1264350023 2014-10-27
  • 打赏
  • 举报
回复
问题已经定位并解决 问题是: WPF中去边框窗体与WebBrowser控件的兼容问题 解决方案可以参考下面的博文: http://blog.csdn.net/wziyx513225244/article/details/6988494 感谢下博主先.
sl1264350023 2014-10-15
  • 打赏
  • 举报
回复
引用 1 楼 duanzi_peng 的回复:
确保你的转换类中没有错误;设置 Panel.ZIndex="1"属性试试
<Grid x:Name="A1" Margin="0" RenderTransformOrigin="0.5,0.5" ZIndex="1"> 我在contentcontrol的容器上加了,ZIndex=1,无效.而且,从工具上看,它本来就在最上层……。 从snoop反馈的信息看,转换类应该没问题吧,百度确实是我要的页面啊。
exception92 2014-10-15
  • 打赏
  • 举报
回复
确保你的转换类中没有错误;设置 Panel.ZIndex="1"属性试试

17,740

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 .NET Framework
社区管理员
  • .NET Framework社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧