0
在我的Windows Store應用,我在XAML頁面設置網頁視圖:集的XAML網頁視圖
<WebView x:Name="wv1" Visibility="Collapsed"/>
<Image x:Name="img" Source="Assets/fb1.png" Stretch="Fill" Tapped="img_Tapped" />
我想,當圖片被點擊屏幕,web視圖加載到指定的URI。
我設置了圖片上的點擊功能,在點擊時導航到google.com。
private void wv1_Tapped(object sender, TappedRoutedEventArgs e)
{
Uri uri = new Uri("http://www.google.com/");
wv1.Navigate(uri);
}
但是當我點擊圖像時,什麼也沒有發生。
我該如何解決這個問題,以便當我點擊屏幕上的圖像時,它將使用webview導航到Google而無需離開應用程序?
感謝它的工作。 – user1704514