ProvideLanguageServiceAttribute.ShowMatchingBrace Property

Definition

Determines if the matching language pair is shown in the status bar.

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

Property Value

Returns true if the matching language pair is shown in the status bar; otherwise, returns false.

Examples

[ProvideLanguageService(typeof(MyLanguageService),           // Required  
                        MyConstants.languageName,            // Required  
                        MyConstants.languageNameResourceID,  // Required  
    // Optional language service properties  
    ShowMatchingBrace = true,  // show matching brace in status bar  
                       )]  

Remarks

When a matching language pair is highlighted, the matched element can be displayed in the status bar if the ShowMatchingBrace property is set to true. This is not typically useful unless the text before the matching language element is also shown. For example, typing the closing brace '}' for an if statement where the opening brace '{' is on the same line as the if statement could show the entire if statement and opening brace in the status bar. This does mean that the if statement would also be highlighted along with the opening brace. The MatchBraces property must also be set to true for the ShowMatchingBrace property to be used.

This property is specific to the managed package framework (MPF).

The default is true when the corresponding registry entry is accessed through the LanguagePreferences class.

The registry entry looks like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\[X.Y]\Languages\Language Services\  
  [Language Name]\  
    ShowMatchingBrace = reg_dword: 0x00000001  

Applies to