My datagridview displays a string containing emoji that's blanked out:
However, when I cut and paste over to MS Word, it displays correctly:
I thought it's a font issue, but changing fonts to not avail. Any ideas?
Related
I've a Telerik RadGrid with 11 columns that is getting displayed normally on the web application,
however when I try to export this grid to word, it doesn't fit the document width and shows only the very first 6 columns,
I'm using _grid.MasterTableView.ExportToWord(); to export to Word
And I've tried to tweak its size a bit using _grid.MasterTableView.Width = Unit.Parse("300mm"); but still some columns are still not visible,
from the Word itself, I've tried to reduce the font size to 10 on the exported document, and I found that this will help displaying the entire grid on one document, however i cannot set set the Font property of the MasterTableView as it has no setter,
is there a way to make sure the entire grid columns will be displayed.
The exported document with hidden columns image
To solve this I've used
_grid.MasterTableView.Style["font-size"] = "10px";
I am creating a small tool like text editor. I am fetching fonts from system and applying to text written on editor.
string fontName = (string)Fonttype.SelectedItem;
RichTextControl.Selection.ApplyPropertyValue(
System.Windows.Controls.RichTextBox.FontFamilyProperty, fontName);
But font installed like STMSaradha.ttf(Bengali font) won't show properly on RichTextBox, some text will get combined and don't show properly. Any suggestions?
Screenshot:
I am developing an app for Windows 8.1
The App parses HTML codes, and displays the contents on RichTextBlock.
Anyway, I'm trying to display some texts with 'StrikeThrough' line. like shown below.
I searched through the web, but I just found that there is no native way to do that on WIndows 8.1
I tried the solution on 'StrikeThrough effect on a TextBlock', but I don't think this solution can display some texts which exceed the width of RichTextBlock (I need those texts to be displayed in new line.)
Also, I don't display texts on TextBlock directly,
In my app, texts are displayed like below
RichTextBlock - Paragraph - Run (Texts)
Is there any good solution for this problem?
(The easiest way to display 'Strikeout texts' on RichTextBlock)
Thanks in advance.
Add this to your text
TextBlock1.TextDecorations = TextDecorations.Strikethrough;
I am trying to perform edit functions in a RichTextBox on a C# (Windows Forms) application.
I would like to be able to select any number of text characters in the script then change targeted font characteristics.
The trouble I have is that each characters font properties may be set to different font. In this case the textbox ignores the event that I request.
How can I solve my problem?
Take a look at this:
Changing font for richtextbox without losing formatting
I think it's the same issue. LarsTech's solution is working perfectly for me.
I have a code to change the size:
RichTextBox1.Font.Size == new System.Drawing.Font(RichTextBox1.Font.Name, yoursize)
And if you want to change only the selected text size:
RichTextBox1.SelectionFont.Size == new System.Drawing.Font(RichTextBox1.SelectionFont.Name, yoursize)
Hope it will help.
Basically, I was able to successfully generate a multiple page PDF (from a string read from a .txt file) using the MigraDoc sample here:
http://www.pdfsharp.net/wiki/MigraDocHelloWorld-sample.ashx
The problem is that in the original text there are tabs and whitespace that yields a document with centered text, as well as sections of text separated by spaces. It looks this way in notepad as well as in the string viewer in Visual Studio.
When the PDF is generated, everything is left justified and all of the tabs and extra whitespace has been removed.
Given the sample in the above link, how can I keep the originally white space? It seems like if notepad can render it correctly and the string reads in correctly in C#, the PDF generated should also look exactly the same.
MigraDoc is like HTML: multiple spaces get merged into one space.
To get centred text with MigraDoc, just set the paragraph to centre alignment. IMHO that is the best way.
To retain multiple spaces in pre-formatted text just replace the spaces with non-breaking spaces.
See also:
https://stackoverflow.com/a/19301602/1015447