Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在windows 8 metro样式应用程序中放置链接_C#_Xaml_Windows Store Apps - Fatal编程技术网

C# 在windows 8 metro样式应用程序中放置链接

C# 在windows 8 metro样式应用程序中放置链接,c#,xaml,windows-store-apps,C#,Xaml,Windows Store Apps,如何将我的网址www.facebook.com链接到我的超链接按钮,并将其加载到我的应用程序页面。过程。开始(“”);这将加载facebook.com上的默认浏览器这是您需要的吗 launcher类呢?您可以使用Launcher类在默认处理程序中启动文档,即使用默认浏览器加载网站,据我所知,您不能仅仅创建一个流程 async void DefaultLaunch() { // Path to the file in the app package to launch string i

如何将我的网址www.facebook.com链接到我的超链接按钮,并将其加载到我的应用程序页面。

过程。开始(“”);这将加载facebook.com上的默认浏览器这是您需要的吗

launcher类呢?您可以使用Launcher类在默认处理程序中启动文档,即使用默认浏览器加载网站,据我所知,您不能仅仅创建一个流程

async void DefaultLaunch()
{
   // Path to the file in the app package to launch
   string imageFile = @"images\test.png";

   var file = wait Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(imageFile);

   if (file != null)
   {
      // Launch the retrieved file
      var success = await Windows.System.Launcher.LaunchFileAsync(file);

      if (success)
      {
         // File launched
      }
      else
      {
         // File launch failed
      }
   }
   else
   {
      // Could not find file
   }
}

只能在
WebView
控件中加载网页。首先将其放在页面上的某个位置:

<WebView x:Name="MyWebView" />

当用户点击fb图标时,我想把社交网站的所有图标都放在它应该加载的地方,我正在用c#和Xaml做。你想把它加载到用户的默认浏览器中还是创建某种web视图?它应该加载到我的应用程序页面,而不是用户的网页或默认浏览器中。第二句话似乎与第一句有冲突。也许根本不需要它?
private void Hyperlink_OnClick(object sender, RoutedEventArgs e)
{
    MyWebView.Navigate(new Uri("http://www.facebook.com"));
}