获取 Windows Phone 的 User-Agent 字符串

使用方法

public partial class HomeView : PhoneApplicationPage
{
    public HomeView()
    {
        InitializeComponent();
        Loaded += HomeView_Loaded;
    }

    private void HomeView_Loaded(object sender, RoutedEventArgs e)
    {
        UserAgentHelper.GetUserAgent(
            LayoutRoot,
            userAgent =>
                {
                    // TODO: Store this wherever you want
                    ApplicationSettings.Current.UserAgent = userAgent;
                });
    }
}

  详细说明:http://wp.662p.com/thread-7945-1-1.html

posted on 2014-11-20 11:51  liniuzen  阅读(277)  评论(1编辑  收藏  举报

导航