Class RichTextBoxHelper
Inheritance
System.Object
RichTextBoxHelper
Namespace: Syncfusion.Windows.Controls.Grid.Converter
Assembly: Syncfusion.GridConverter.Wpf.dll
Syntax
public static class RichTextBoxHelper : Object
Methods
AppendFormat(IFont, Run, Boolean)
This method returns System.Windows.Documents.Run which append the next character when both have same font format.
Declaration
public static Run AppendFormat(IFont charfont, Run run, bool isnewline)
Parameters
Type | Name | Description |
---|---|---|
IFont | charfont | An instance of IFont |
System.Windows.Documents.Run | run | An instance of System.Windows.Documents.Run |
System.Boolean | isnewline | If the character falls in new line set True, other wise False. |
Returns
Type |
---|
System.Windows.Documents.Run |
ConvertIRangeToParagraph(IRichTextString)
ConvertIRangeToParagraph() method convert the IRange into Paragraph value.
Declaration
public static Paragraph ConvertIRangeToParagraph(IRichTextString RichText)
Parameters
Type | Name | Description |
---|---|---|
IRichTextString | RichText |
Returns
Type |
---|
System.Windows.Documents.Paragraph |
ConvertRunToIFont(Run, IFont)
ConvertRunToIFont() method converts the formatting from Run to IFont.
Declaration
public static IFont ConvertRunToIFont(Run run, IFont fontstyle)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Documents.Run | run | |
IFont | fontstyle |
Returns
Type |
---|
IFont |
IsFormatSame(IFont, IFont)
IsFormatSame() method validates the formatting for both the character is same or not.
Declaration
public static bool IsFormatSame(IFont char1, IFont char2)
Parameters
Type | Name | Description |
---|---|---|
IFont | char1 | |
IFont | char2 |
Returns
Type |
---|
System.Boolean |
SetRichTextValue(IRange, FlowDocument, String)
Declaration
public static void SetRichTextValue(IRange range, FlowDocument flowdocument, string formattedtext)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | |
System.Windows.Documents.FlowDocument | flowdocument | |
System.String | formattedtext |
SetRichTextValue(IRange, Paragraph, String)
UpdateExcelCellVaue()is a static method invoked to update the modified cell value to Excel sheet only for RichText Cell Type.
Declaration
public static void SetRichTextValue(IRange range, Paragraph paragraph, string PlainText)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | Current Range value in the Excelsheet |
System.Windows.Documents.Paragraph | paragraph | Modified cells value in the Grid as Paragraph |
System.String | PlainText | Unformatted Text |