Class CodeSnippet
Represents a class that provides same functionalities as VS2005-like code snippet.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Edit.Utils.CodeSnippets
Assembly: Syncfusion.Edit.Windows.dll
Syntax
public class CodeSnippet : IXmlSerializable
Constructors
CodeSnippet()
Initializes a new instance of the CodeSnippet class.
Declaration
public CodeSnippet()
CodeSnippet(String, ArrayList, String)
Initializes a new instance of the CodeSnippet class.
Declaration
public CodeSnippet(string title, ArrayList literals, string code)
Parameters
Type | Name | Description |
---|---|---|
System.String | title | Snippet title. |
System.Collections.ArrayList | literals | List of literals. |
System.String | code | Snippet code. |
Properties
Author
Gets or sets the snippet author.
Declaration
public string Author { get; set; }
Property Value
Type |
---|
System.String |
Code
Gets or sets the text of code snippet.
Declaration
public string Code { get; set; }
Property Value
Type |
---|
System.String |
Description
Gets or sets the snippet description.
Declaration
public string Description { get; set; }
Property Value
Type |
---|
System.String |
Format
Gets or sets the snippet format identifier.
Declaration
public string Format { get; set; }
Property Value
Type |
---|
System.String |
Language
Gets or sets the snippet language.
Declaration
public string Language { get; set; }
Property Value
Type |
---|
System.String |
Literals
Gets the list of code snippet literals.
Declaration
public ArrayList Literals { get; }
Property Value
Type |
---|
System.Collections.ArrayList |
Shortcut
Gets or sets the snippet shortcut.
Declaration
public string Shortcut { get; set; }
Property Value
Type |
---|
System.String |
Title
Gets or sets the title of code snippet.
Declaration
public string Title { get; set; }
Property Value
Type |
---|
System.String |
Methods
GetLiteralDefault(String)
Gets the literal's default text by specified ID.
Declaration
public string GetLiteralDefault(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Literal ID. |
Returns
Type | Description |
---|---|
System.String | Literal text. |
GetLiteralToolTip(String)
Gets the literal's default text by specified ID.
Declaration
public string GetLiteralToolTip(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Literal ID. |
Returns
Type | Description |
---|---|
System.String | Literal toolTip text. |
GetSchema()
Gets the schema (Not used for proper interface implementation).
Declaration
public XmlSchema GetSchema()
Returns
Type | Description |
---|---|
System.Xml.Schema.XmlSchema | XmlSchema. |
ReadXml(XmlReader)
Performs custom Xml deserialization.
Declaration
public void ReadXml(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader. |
WriteXml(XmlWriter)
Performs custom Xml serialization.
Declaration
public void WriteXml(XmlWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | XmlWriter |
Events
TitleChanging
Occurs when title of the snippet is going to be changed.
Declaration
public event ValueChangedEventHandler TitleChanging
Event Type
Type |
---|
ValueChangedEventHandler |