I use HyperLinkButton and add method in c# code for click for him.
Code method:
void btnViewURL_Click(object sender, RoutedEventArgs e)
{
if (string.IsNullOrWhiteSpace(viewURL) == false
&& this.decisionViewModel.IsURLValid(viewURL))
{
System.Windows.Browser.HtmlPage.Window.Navigate(new Uri(viewURL, UriKind.Absolute), "_blank");
}
}
This code worked in ie but not in Safari.
After I try to use NavigateUrl property in xaml. I added binding, but this method does not work too in Safari. If I set plain text url (for example - "https://google.com" without binding so then Safari opened link.
<HyperlinkButton Margin="8,0,0,0" x:Name="linkStaticURL"
NavigateUri="{Binding viewURL}"
TargetName="_blank">
<TextBlock Text="Reader"</TextBlock>
</HyperlinkButton>
How can I solve this problem?