這個是簡單介紹一下如何在wp開發中獲取 Windows Phone 的 User-Agent 字符串,更多wp移動開發就去那個wp教程網吧。http://wp.662p.comhtml
使用方法 工具
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; }); } }
工具類this