WPF的WebBrowser控件打开flash,如何屏蔽警告信息

Title:To help protect your security, your web browser has restricted this file from showing active content that could access your computer. Click here for options...

 

在WPF窗口中,使用WebBrowser控件打开flash,可能会弹出以下的警告信息,而导致你无法在第一时间看到flash,必须右键单击警告框,选择“允许被组织的内容”,才能正常看到flash:

To help protect your security, your web browser has restricted this file from showing active content that could access your computer. Click here for options...

为了帮助保护您的安全,您的浏览器已经限制此文件显示可能访问您的计算机的活动内容。单击此处查看选项……

如下图:

解决办法:

在指定WebBrowser的source的时候,使用文件系统路径,例如:

<Window x:Class="B1Motion.ViewDashboard"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="ViewDashboard" Height="1010" Width="1900">
    <Grid>
        <WebBrowser x:Name="WebBrowser1"  Source="file://127.0.0.1/c$/dashboard1.swf"></WebBrowser>
    </Grid>
</Window>

这样,就可以避免弹出警告信息了。

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值