Partilhar via


LanguagePreferences.EnableShowMatchingBrace Property

Definition

Gets or sets whether or not the text included in the span of the matching pair is shown in the status bar.

public:
 property bool EnableShowMatchingBrace { bool get(); void set(bool value); };
public:
 property bool EnableShowMatchingBrace { bool get(); void set(bool value); };
public bool EnableShowMatchingBrace { get; set; }
member this.EnableShowMatchingBrace : bool with get, set
Public Property EnableShowMatchingBrace As Boolean

Property Value

true if the text included in the matching pair span can be shown, otherwise false.

Remarks

Note that this property does not affect the highlighting of matching braces, only whether any text is shown in the status bar.

When a matching pair of language elements is parsed, typically, the span of the actual pairs is returned in response to the ParseReason value MatchBraces. However, it is possible to include an additional span that specifies an associated language element. For example, in C#, "if (...)" typically precedes an opening brace. When the closing brace of the if statement is typed, the parser is asked for the matching brace. The parser locates the opening brace and can include the span for the "if (...)" as well. This additional text can be shown in the status bar if the EnableShowMatchingBrace property returns true. If the additional span is not included, then only the matching character is shown in the status bar. Be aware that any additional span returned is highlighted in the view as well.

This property is associated with the registry entry ShowMatchingBraces.

In the base method, even though this property can be set, the value is not written back to the registry.

Applies to