BlipFace.View.Controls.StatusBindableTextBlock.CreateHyperLink C# (CSharp) Method

CreateHyperLink() private static method

Tworzy linka i ustawia jego właściwości
private static CreateHyperLink ( string linkText, string linkAdress, string toolTip, System.Windows.FontWeight weight, System.Windows.Media.Brush linkColor, RoutedCommand command ) : Hyperlink
linkText string
linkAdress string
toolTip string
weight System.Windows.FontWeight
linkColor System.Windows.Media.Brush
command RoutedCommand
return System.Windows.Documents.Hyperlink
        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;
        }