コード例 #1
0
 private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
 {
     if (ExternalLinkedSites.IsApprovedSite(e.Uri))
     {
         Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
         e.Handled = true;
     }
 }
コード例 #2
0
        public WhatsNewWindow()
        {
            InitializeComponent();

            CommandBindings.Add(new CommandBinding(NavigationCommands.GoToPage, (sender, e) =>
            {
                if (ExternalLinkedSites.IsApprovedSite(new Uri(e.Parameter.ToString())))
                {
                    Process.Start((string)e.Parameter);
                }
            }));
        }