BudgetAnalyser.LedgerBook.LedgerBookGridBuilderV2.AddHyperlinkToGrid C# (CSharp) Method

AddHyperlinkToGrid() private method

private AddHyperlinkToGrid ( System.Windows.Controls.Panel parent, string hyperlinkText, int &gridRow, int gridColumn, string style, string tooltip = null, object parameter = null ) : System.Windows.Controls.TextBlock
parent System.Windows.Controls.Panel
hyperlinkText string
gridRow int
gridColumn int
style string
tooltip string
parameter object
return System.Windows.Controls.TextBlock
        private TextBlock AddHyperlinkToGrid(Panel parent, string hyperlinkText, ref int gridRow, int gridColumn, string style, string tooltip = null, object parameter = null)
        {
            var hyperlink = new Hyperlink(new Run(hyperlinkText))
            {
                Command = this.showTransactionsCommand,
                CommandParameter = parameter
            };
            var textBlock = new TextBlock(hyperlink)
            {
                Style = (Style)FindResource(style),
                ToolTip = tooltip ?? hyperlinkText
            };
            Grid.SetColumn(textBlock, gridColumn);
            Grid.SetRow(textBlock, gridRow++);
            parent.Children.Add(textBlock);
            return textBlock;
        }