private static Hyperlink CreateHyperLink(string linkText, string linkAdress, string toolTip, FontWeight weight,
Brush linkColor, RoutedCommand command)
{
System.Windows.Controls.ToolTip tip = new ToolTip();
tip.Content = toolTip;
tip.StaysOpen = true;
tip.Style = (Style) Application.Current.FindResource("YellowToolTipStyle");
Hyperlink hyperlink = new Hyperlink(new Run(linkText))
{
NavigateUri = new Uri(linkAdress),
TextDecorations = null,
FontWeight = weight,
//FontWeights.SemiBold,
Foreground = linkColor,
ToolTip = tip
};
hyperlink.Command = command;
hyperlink.CommandParameter = linkAdress;
ToolTipService.SetInitialShowDelay(hyperlink,700);
ToolTipService.SetShowDuration(hyperlink,15000);
//hyperlink.AddHandler(Hyperlink.RequestNavigateEvent,
// new RequestNavigateEventHandler(HyperLinkRequestNavigate));
return hyperlink;
}