Class CodeFormatter
Inheritance
Namespace: Telerik.Windows.Documents.Model.Code
Assembly: Telerik.Windows.Controls.RichTextBox.dll
Syntax
public class CodeFormatter : Object
Constructors
CodeFormatter()
Declaration
public CodeFormatter()
Methods
GetCodeLanguages()
Gets all registered the code languages.
Declaration
public IEnumerable<CodeLanguage> GetCodeLanguages()
Returns
System.
|
GetFormattedFragment(String, CodeFormattingSettings)
Creates fragment containing formatted code block.
Declaration
public DocumentFragment GetFormattedFragment(string code, CodeFormattingSettings settings)
Parameters
System. The code. |
Code The settings. |
Returns
Document 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
Classification The type. |
Code The code language. |
Style The style definition. |
RegisterClassificationType(ClassificationType, StyleDefinition)
Registers classification type and its corresponding style.
Declaration
public void RegisterClassificationType(ClassificationType type, StyleDefinition styleDefinition)
Parameters
Classification The classification type. |
Style 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
Code The code language. |
ITagger<Classification The tagger. |
UnregisterClassificationType(ClassificationType)
Unregisters classification type and its corresponding style.
Declaration
public void UnregisterClassificationType(ClassificationType type)
Parameters
Classification 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
Classification The type. |
Code The code language. |
UnregisterCodeLanguage(CodeLanguage)
Unregisters a code language and its corresponding tagger.
Declaration
public void UnregisterCodeLanguage(CodeLanguage codeLanguage)
Parameters
Code The code language. |