menu

WPF

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

    Show / Hide Table of Contents

    Class LanguageBase

    Inheritance
    System.Object
    LanguageBase
    MarkupLanguageBase
    ProceduralLanguageBase
    TextLanguage
    Namespace: Syncfusion.Windows.Edit
    Assembly: Syncfusion.Edit.Wpf.dll
    Syntax
    public abstract class LanguageBase : DependencyObject

    Constructors

    LanguageBase(EditControl)

    Initializes a new instance of the LanguageBase class.

    Declaration
    public LanguageBase(EditControl control)
    Parameters
    Type Name Description
    EditControl control

    represents the parent EditControl

    Fields

    currentBlockCount

    A Publicly declared CurrentBlockCount variable

    Declaration
    public int currentBlockCount
    Field Value
    Type
    System.Int32

    FormatsProperty

    Dependency property for Formats property

    Declaration
    public static readonly DependencyProperty FormatsProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    isCurrentBlockComment

    A publicly declared IsCurrentBlockComment variable

    Declaration
    public bool isCurrentBlockComment
    Field Value
    Type
    System.Boolean

    IsIndentSelectionOnTabEnabledProperty

    Dependency property for IsIndentSelectionOnTabEnabled Property

    Declaration
    public static readonly DependencyProperty IsIndentSelectionOnTabEnabledProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    LexemProperty

    Dependency property for Lexem property

    Declaration
    public static readonly DependencyProperty LexemProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    literalCount

    A public variable literalcount

    Declaration
    public int literalCount
    Field Value
    Type
    System.Int32

    SupportsOutliningProperty

    Dependency property for Supports Outlining property

    Declaration
    public static readonly DependencyProperty SupportsOutliningProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    Properties

    ApplyColoring

    Gets or sets a value indicating if the language supports syntax highlighting

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

    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.

    CommitsIntellisenseItemOnSpaceBar

    Gets or sets a value indicating whether the selected intellisense items to be appended when space bar is pressed.

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

    EllipsisText

    Gets or sets a value indicating the text to be displayed when a block is collapsed. By default its set to "..."

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

    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 or Sets a collection of type of IFormat indicating the language configurations. It has been modified to IEnumerable type to allow the users to binding a custom collection as language formats.

    Declaration
    public IEnumerable Formats { get; set; }
    Property Value
    Type
    System.Collections.IEnumerable

    IndentableBlocks

    Declaration
    public List<BlockListener> IndentableBlocks { get; }
    Property Value
    Type
    System.Collections.Generic.List<BlockListener>

    IntellisenseCommitCharacters

    Gets or sets a value indicating when the selected intellisense items to be appended. The string given will be coverted to individual characters internally and verified to append the selected item to text.

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

    IntellisenseDrillDownChar

    Gets or sets a value indicating a char on which the sub-items of the intellisense items to displayed.

    Declaration
    public char IntellisenseDrillDownChar { get; set; }
    Property Value
    Type
    System.Char

    IsIndentSelectionOnTabEnabled

    Gets or sets a value indicating whether the selected should be indented or removed when tab key is pressed.

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

    IsSplitTextToWords

    Gets or sets a value indicating if the text in lines has to be splitted in to tokens.

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

    Lexem

    Gets or Sets a collection of type of ILexem indicating the language configurations. It has been modified to IEnumerable type to allow the users to binding a custom collection as language lexems.

    Declaration
    public IEnumerable Lexem { get; set; }
    Property Value
    Type
    System.Collections.IEnumerable

    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.

    ParentControl

    Gets a value indicating the parent EditControl reference.

    Declaration
    public EditControl ParentControl { get; }
    Property Value
    Type
    EditControl

    SplitLinesRegex

    Gets or sets a value indicating the Regex to be applied for splitting the text in lines.

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

    SplitWordsRegex

    Gets or sets a value indicating the Regex to be applied for splitting the lines into individual tokens.

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

    SupportsIntellisense

    Gets or sets a value indicating whether the language supports Intellisense or not

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

    Type: System.Boolean

    Remarks

    Specifies the particular language supports Intellisense or not.

    SupportsOutlining

    Gets or Sets a value indicating whether the language supports outlining

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

    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.

    TypesCollection

    Gets the Types tree generated based on the assembly references.

    Declaration
    public EditTypeCollection TypesCollection { get; }
    Property Value
    Type
    EditTypeCollection

    Methods

    ApplyColor(String, Int32)

    Helper method to apply coloring to the text based on the Lexems in the Language configurations

    Declaration
    protected virtual IFormat ApplyColor(string text, int line)
    Parameters
    Type Name Description
    System.String text

    The text to apply color.

    System.Int32 line

    The line number of the text.

    Returns
    Type Description
    IFormat

    Returns the IFormat

    ApplyExpandCollapse(ApplyExpandCollapseArgs)

    Helper method for perform expand collapse for line items. This method can be overridden if custom expand logics has be implemented.

    Declaration
    protected virtual void ApplyExpandCollapse(ApplyExpandCollapseArgs args)
    Parameters
    Type Name Description
    ApplyExpandCollapseArgs args

    ApplyExpandItems()

    Helper method to Apply Expansions for the content in the EditControl.

    Declaration
    public virtual void ApplyExpandItems()

    ExecuteBackspace()

    Helper method for backspace key activity

    Declaration
    protected virtual void ExecuteBackspace()

    ExecuteDeleteText()

    Helper method for delete key activity

    Declaration
    protected virtual void ExecuteDeleteText()

    GetIndentLevel(Int32)

    Declaration
    protected virtual int GetIndentLevel(int lineNumber)
    Parameters
    Type Name Description
    System.Int32 lineNumber
    Returns
    Type
    System.Int32

    GetSelectionEndIndex(LineItem)

    Declaration
    protected virtual int GetSelectionEndIndex(LineItem lineitem)
    Parameters
    Type Name Description
    LineItem lineitem
    Returns
    Type
    System.Int32

    GetTextInCollapsedArea(LineItem)

    Declaration
    protected virtual string GetTextInCollapsedArea(LineItem lineItem)
    Parameters
    Type Name Description
    LineItem lineItem
    Returns
    Type
    System.String

    HideIntellisensePopup()

    Method to Hide Intellisense Popup.

    Declaration
    public void HideIntellisensePopup()

    InitializeApplyExpandCollapse()

    Declaration
    protected virtual void InitializeApplyExpandCollapse()

    OnFormatsChanged(DependencyPropertyChangedEventArgs)

    Helper method to perform operations when the Formats property gets changed.

    Declaration
    protected virtual void OnFormatsChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    OnLexemsChanged(DependencyPropertyChangedEventArgs)

    Helper method to perform operations when the Lexem property gets changed.

    Declaration
    protected virtual void OnLexemsChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    PositionIntellisenseBox(EditIntellisenseArgs)

    Method to adjust the position of the intellisense box.

    Declaration
    public virtual void PositionIntellisenseBox(EditIntellisenseArgs args)
    Parameters
    Type Name Description
    EditIntellisenseArgs args

    represents the cursor index

    RefreshExpandItems(Int32)

    Helper method to refresh lines expansions from a specified line number. Here line number refers to the index (starts from 0)

    Declaration
    public virtual void RefreshExpandItems(int line)
    Parameters
    Type Name Description
    System.Int32 line

    ShowIntellisenseBox(EditIntellisenseArgs)

    Declaration
    protected virtual void ShowIntellisenseBox(EditIntellisenseArgs args)
    Parameters
    Type Name Description
    EditIntellisenseArgs args

    SplitTextToLines()

    A helper method to split the text in the EditControl in to individual lines.

    Declaration
    public virtual void SplitTextToLines()
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved