这个是简单介绍一下如何在wp开发中获取 Windows Phone 的 User-Agent 字符串,更多wp移动开发就去那个wp教程网吧。http://wp.662p.com
使用方法
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; }); } }
工具类