wpf中显示HTML(转自http://steeven.cnblogs.com/archive/2006/06/12/424258.html)

真是匪夷所思,目前版本居然不支持
从论坛查到有两个方法:
1. 如果有url, 用frame
2. 如果没有,需要在用到winform和wpf的互操作,就是嵌入winform的Webbrowser控件。
需要引入两个dll,xaml如下:
  <windowsformshost ClipToBounds="True" Opacity="1" Foreground="{x:Null}" Height="Auto" VerticalAlignment="Stretch" Grid.RowSpan="1" Grid.Row="1" x:Name="WindowsFormsHost" Margin="0,51.3214285714285,0,0">
<wf:webbrowser x:Name="webBrowser"></wf:webbrowser>
</windowsformshost>

posted on 2007-09-05 00:54  caoyang.org  阅读(379)  评论(0编辑  收藏  举报

导航