启用silverlight3的out of browser

启用silverlight3的out of browser
 
启用out of browser需要修改项目中Properties文件夹下的AppManifest.xml文件
< Deployment 
  
xmlns ="http://schemas.microsoft.com/client/2007/deployment"
  xmlns:x
="http://schemas.microsoft.com/winfx/2006/xaml" >
  
< Deployment.Parts >
  
</ Deployment.Parts >
  
< Deployment.ApplicationIdentity >
    
< ApplicationIdentity
        
ShortName ="Out of Browser"
        Title
="This app is out of the browser!" >
      
< ApplicationIdentity.Blurb >
        Sample Out of the Browser App
      
</ ApplicationIdentity.Blurb >
    
</ ApplicationIdentity >
  
</ Deployment.ApplicationIdentity >
</ Deployment >
在写了一下out of browser的判断
public  MainControl()
{
//  Required to initialize variables
InitializeComponent();
            App.Current.Host.Content.Resized 
+=   new  EventHandler(Content_Resized);
            
this .Loaded  +=   new  RoutedEventHandler(MainControl_Loaded);
}

        
void  MainControl_Loaded( object  sender, RoutedEventArgs e)
        {
            
if  (App.Current.RunningOffline) {
                xTxt.Text 
=   " out of browser " ;
            }
        }

        
void  Content_Resized( object  sender, EventArgs e)
        {
            
this .Width  =  App.Current.Host.Content.ActualWidth;
            
this .Height  =  App.Current.Host.Content.ActualHeight;
        }
运行程序的界面
右键点击
选择安装out of browser
运行效果
卸载也很方便 不管是在浏览器 还是 在 out of browser中点击右键都会出现卸载选项。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值