Silverlight HtmlPage使用之二 获得浏览器版本和系统版本信息

Silverlight HtmlPage使用之二 获得浏览器版本和系统版本信息,第1张

概述xaml代码 < UserControl x:Class= "SilverlightApplication1.HtmlPageControl"     xmlns= "http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x= "http://schemas.microsoft.com/winfx/2006/xam

xaml代码

< UserControl x:Class= "SilverlightApplication1.HTMLPageControl"
    xmlns=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x=
"http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d=
"http://schemas.microsoft.com/Expression/blend/2008"
    xmlns:mc=
"http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable=
"d"
    d:DesignHeight=
"300"  d:DesignWIDth= "400">
    
    < GrID x:name= "LayoutRoot"  Background= "White">
< button Content= "browser"  Height= "23"  HorizontalAlignment= "left"  
margin=
"128,12,0"  name= "button2"  VerticalAlignment= "top"
 WIDth= "75"  Click= "button2_Click"  />

    < /GrID>
< /UserControl>
 

  cs代码

      private voID button2_Click(object sender, RoutedEventArgs e)
        {
            System.@R_301_5087@.browser.browserinformation browser = HTMLPage.browserinformation;
            Version ver = browser.browserVersion;
             int buld= ver.Build;//浏览器版本内部编号
             int minor = ver.Minor;//浏览器版本次要编号
             int major = ver.Major;//浏览器版本主要编号
             bool enablecookie = browser.cookiesEnabled;//浏览器是否支持cookie
             string browsername = browser.name;//浏览器名称
             string platform = browser.Platform;// *** 作系统名称
             string productname = browser.Productname;//浏览器产品名称
             string productVersion = browser.ProductVersion;//浏览器产品版号
             string userAgent = browser.UserAgent;//用户代理字符串
   //浏览显示  请自写  也可以用vs断点查看 谢谢        }本文来自mldark的博客,原文地址:http://hi.baIDu.com/mldark/blog/item/3c6c0c0bd642b728b0351dfb.HTML

总结

以上是内存溢出为你收集整理的Silverlight HtmlPage使用之二 获得浏览器版本系统版本信息全部内容,希望文章能够帮你解决Silverlight HtmlPage使用之二 获得浏览器版本和系统版本信息所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1078085.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-27
下一篇2022-05-27

发表评论

登录后才能评论

评论列表(0条)

    保存