Xamarin.forms Xamarin表单:打开浏览器并开始搜索保存在本地数据库中的关键字
我使用以下代码从我的xamarin表单应用程序打开googleXamarin.forms Xamarin表单:打开浏览器并开始搜索保存在本地数据库中的关键字,xamarin.forms,Xamarin.forms,我使用以下代码从我的xamarin表单应用程序打开google Device.OpenUri(new Uri("http://www.google.com")); 我还使用以下代码在本地数据库中保存一个字符串 Application.Current.Properties["MyIP"] = mystring; 我想打开浏览器并自动搜索此关键字。 可能吗 提前感谢。您可以通过URL将搜索查询传递给谷歌: var mySearchQuery = Application.Current.Pro
Device.OpenUri(new Uri("http://www.google.com"));
我还使用以下代码在本地数据库中保存一个字符串
Application.Current.Properties["MyIP"] = mystring;
我想打开浏览器并自动搜索此关键字。
可能吗
提前感谢。您可以通过URL将搜索查询传递给谷歌:
var mySearchQuery = Application.Current.Properties["MyIP"]?.ToString();
Device.OpenUri(new Uri($"https://www.google.com/search?q={mySearchQuery}"));