menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class EditLanguage - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class EditLanguage

    EditLanguage class is used to creating Language configurations for Syntax highlighting and Outlining

    Inheritance
    System.Object
    EditLanguage
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Edit
    Assembly: Syncfusion.Edit.Wpf.dll
    Syntax
    [Obsolete("This class is no longer in use due to modifications in language implementation, Kindly use create a class inheriting from LanguageBase or ProceduralLanguageBase or MarkupLanguageBase")]
    public class EditLanguage
    Remarks

    Edit Language class contains the format collection and lexem collection with language name, file extension, case sensitive, text foreground properties.

    Examples
    // Initializing EditLanguage
    EditLanguage EditLanguage1 = new EditLanguage();
    EditLanguage1.Name = "CSharp";
    EditLanguage1.FileExtension = ".cs";

    Constructors

    EditLanguage()

    Initializes a new instance of the EditLanguage class.

    Declaration
    public EditLanguage()
    Remarks

    EditLanguage constructor used to initializes the Format and Lexem collections.

    Properties

    BlockEnd

    Gets or sets BlockEnd property. Specifies the end symbol that denotes end of block of code

    Declaration
    public string BlockEnd { get; set; }
    Property Value
    Type Description
    System.String

    Type: System.String

    Remarks

    Specifies the Block End text.

    BlockStart

    Gets or sets BlockStart property. Specifies the start symbol that denotes start of a block of code

    Declaration
    public string BlockStart { get; set; }
    Property Value
    Type Description
    System.String

    Type: System.String

    Remarks

    Specifies the Block start text.

    CaseSensitive

    Gets or sets a value indicating whether the Language has case sensitive or not

    Declaration
    public bool CaseSensitive { get; set; }
    Property Value
    Type Description
    System.Boolean

    Type: System.Boolean

    Remarks

    Specifies the particular language is case sensitive or not.

    FileExtension

    Gets or sets File Extension supported by the language

    Declaration
    public string FileExtension { get; set; }
    Property Value
    Type Description
    System.String

    Type: System.String

    Remarks

    Specifies the file extension.

    Formats

    Gets a collection type property that contains the list of text styles to be applied to the language

    Declaration
    public FormatsCollection Formats { get; }
    Property Value
    Type Description
    FormatsCollection

    Type: Syncfusion.Windows.Edit.FormatsCollection

    Remarks

    This Format property returns the Format Collection to the language content.

    LanguageType

    Gets or sets a Specific type of language. For instance, Procedural or Markup

    Declaration
    public EditLanguageType LanguageType { get; set; }
    Property Value
    Type Description
    EditLanguageType

    Type: Syncfusion.Windows.Edit.EditLanguageType

    Remarks

    The LanguageType property used to get and sets the language types like Procedural or Markup.

    Lexems

    Gets a Collection type property that contains the list of Lexical elements to be colored using the defined formats

    Declaration
    public LexemCollection Lexems { get; }
    Property Value
    Type Description
    LexemCollection

    Type: Syncfusion.Windows.Edit.LexemCollection

    Remarks

    This Lexems property returns the Lexems Collection.

    Name

    Gets or sets Name of the Language.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    Type: System.String

    Remarks

    Specifies the Name of the Language.

    TextForeground

    Gets or sets foreground brush to be applied when no Lexems are applicable for the text

    Declaration
    public Brush TextForeground { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    TextForeground = Brushes.Green;

    Remarks

    Specifies the particular language Text Foreground.

    Methods

    GetFormat(String)

    Helper method to retrieve format from the formats collection with name as its parameter

    Declaration
    public EditFormats GetFormat(string fname)
    Parameters
    Type Name Description
    System.String fname

    Gets the Formatname from the reporting source

    Returns
    Type Description
    EditFormats

    EditFormat object from Formats collection of EditLanguage class

    Remarks

    Edit format method used to get the format properties of the specified format name.

    See Also

    EditLanguage
    FormatsCollection
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved