Class CodeFormatter
Inheritance
Inherited Members
Namespace: Telerik.WinForms.Documents.Model.Code
Assembly: Telerik.WinControls.RichTextEditor.dll
Syntax
public class CodeFormatter
Constructors
CodeFormatter()
Declaration
public CodeFormatter()
Methods
GetCodeLanguages()
Gets all registered the code languages.
Declaration
public IEnumerable<CodeLanguage> GetCodeLanguages()
Returns
System.Collections.Generic.IEnumerable<CodeLanguage>
|
GetFormattedFragment(String, CodeFormattingSettings)
Creates fragment containing formatted code block.
Declaration
public DocumentFragment GetFormattedFragment(string code, CodeFormattingSettings settings)
Parameters
System.String
code
The code. |
CodeFormattingSettings
settings
The settings. |
Returns
DocumentFragment
DocumentFragments with formatted code block |
RegisterClassificationType(ClassificationType, CodeLanguage, StyleDefinition)
Registers classification type for a specific code language and its corresponding style.
Declaration
public void RegisterClassificationType(ClassificationType type, CodeLanguage codeLanguage, StyleDefinition styleDefinition)
Parameters
ClassificationType
type
The type. |
CodeLanguage
codeLanguage
The code language. |
StyleDefinition
styleDefinition
The style definition. |
RegisterClassificationType(ClassificationType, StyleDefinition)
Registers classification type and its corresponding style.
Declaration
public void RegisterClassificationType(ClassificationType type, StyleDefinition styleDefinition)
Parameters
ClassificationType
type
The classification type. |
StyleDefinition
styleDefinition
The style definition. |
RegisterCodeLanguage(CodeLanguage, ITagger<ClassificationTag>)
Registers a code language and its corresponding tagger.
Declaration
public void RegisterCodeLanguage(CodeLanguage codeLanguage, ITagger<ClassificationTag> tagger)
Parameters
CodeLanguage
codeLanguage
The code language. |
ITagger<ClassificationTag>
tagger
The tagger. |
UnregisterClassificationType(ClassificationType)
Unregisters classification type and its corresponding style.
Declaration
public void UnregisterClassificationType(ClassificationType type)
Parameters
ClassificationType
type
The classification type. |
UnregisterClassificationType(ClassificationType, CodeLanguage)
Unregisters classification type for a specific code language and its corresponding style.
Declaration
public void UnregisterClassificationType(ClassificationType type, CodeLanguage codeLanguage)
Parameters
ClassificationType
type
The type. |
CodeLanguage
codeLanguage
The code language. |
UnregisterCodeLanguage(CodeLanguage)
Unregisters a code language and its corresponding tagger.
Declaration
public void UnregisterCodeLanguage(CodeLanguage codeLanguage)
Parameters
CodeLanguage
codeLanguage
The code language. |