private RichTextBox GetTextBlock() { RichTextBox richTextBox = new RichTextBox(); ((UIElement)richTextBox).Tap += (new EventHandler <System.Windows.Input.GestureEventArgs>(this.textBlock_Tap)); richTextBox.TextWrapping = this.TextWrapping; if (this.LineHeight > 0.0) { richTextBox.LineStackingStrategy = ((LineStackingStrategy)1); richTextBox.LineHeight = this.LineHeight; } richTextBox.IsReadOnly = true; richTextBox.FontSize = base.FontSize; richTextBox.FontFamily = base.FontFamily; richTextBox.HorizontalContentAlignment = base.HorizontalContentAlignment; richTextBox.TextAlignment = this.TextAlignment; richTextBox.Foreground = base.Foreground; richTextBox.Padding = (new Thickness(-12.0, 0.0, -12.0, 0.0)); BrowserNavigationService.SetDisableHyperlinks((DependencyObject)richTextBox, this.DisableHyperlinks); BrowserNavigationService.SetTextId((DependencyObject)richTextBox, this.TextId); BrowserNavigationService.SetHideHyperlinksForeground((DependencyObject)richTextBox, this.HideHyperlinksForeground); return(richTextBox); }