CodeFormatter
Definition
Namespace:Telerik.WinForms.Documents.Model.Code
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class CodeFormatter
Inheritance: objectCodeFormatter
Constructors
public CodeFormatter()
Methods
Gets all registered the code languages.
Creates fragment containing formatted code block.
public DocumentFragment GetFormattedFragment(string code, CodeFormattingSettings settings)
The code.
settingsCodeFormattingSettingsThe settings.
Returns:DocumentFragments with formatted code block
Registers classification type for a specific code language and its corresponding style.
public void RegisterClassificationType(ClassificationType type, CodeLanguage codeLanguage, StyleDefinition styleDefinition)
The type.
codeLanguageCodeLanguageThe code language.
styleDefinitionStyleDefinitionThe style definition.
Registers classification type and its corresponding style.
public void RegisterClassificationType(ClassificationType type, StyleDefinition styleDefinition)
The classification type.
styleDefinitionStyleDefinitionThe style definition.
Registers a code language and its corresponding tagger.
public void RegisterCodeLanguage(CodeLanguage codeLanguage, ITagger<ClassificationTag> tagger)
The code language.
taggerITagger<ClassificationTag>The tagger.
Unregisters classification type for a specific code language and its corresponding style.
public void UnregisterClassificationType(ClassificationType type, CodeLanguage codeLanguage)
The type.
codeLanguageCodeLanguageThe code language.
Unregisters classification type and its corresponding style.
public void UnregisterClassificationType(ClassificationType type)
The classification type.
Unregisters a code language and its corresponding tagger.
public void UnregisterCodeLanguage(CodeLanguage codeLanguage)
The code language.