Properties and Methods

ChromaCode is basically an extension to the WPF RichTextBox. So all of the standard RichTextBox functionality is present and working.

This section will explain the extensions that have been made to the control so that it supports syntax or colour highlighting.

This section will be expanded with more details and code examples in the future.

Syntax Highlighting Specific Properties

DocumentText (string)
This property provides access to the plain text that makes up the entries document.
The property is Read/Write
The property supports two way binding

EnableHighlighting (boolean)
This properties gets or sets whether the contents of the control has any colour highlighting applied to
The property is Read/Write
The property supports databinding

Syntax Highlighting Specific Methods

LoadRules(string ruleXml)
This method loads the contents of the file specified by the path in "ruleXml" into the control. It does not refresh the controls highlighting.

DoHighlight(Paragraph paragraphToHighlight)
This method forces the supplied Paragraph to have its highlighting refreshed.

RefreshDocumentHighlighting()
This method will refresh the highlighting on the whole document. This is useful if a new rule file has been loaded or some complex text manipulation has been carried out which requires the highlighting to be completely redone.

Last edited May 2, 2011 at 7:07 PM by NybbleUK, version 1

Comments

No comments yet.