首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >启用silverlight3的out of browser

启用silverlight3的out of browser

作者头像
用户1172164
发布2018-03-01 18:39:56
5960
发布2018-03-01 18:39:56
举报

启用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中点击右键都会出现卸载选项。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2009-03-19 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档