ProvideLanguageServiceAttribute.ShowMatchingBrace Property
Determines if the matching language pair is shown in the status bar.
Namespace: Microsoft.VisualStudio.Shell
Assemblies: Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Syntax
'Déclaration
Public Property ShowMatchingBrace As Boolean
Get
Set
'Utilisation
Dim instance As ProvideLanguageServiceAttribute
Dim value As Boolean
value = instance.ShowMatchingBrace
instance.ShowMatchingBrace = value
public bool ShowMatchingBrace { get; set; }
public:
property bool ShowMatchingBrace {
bool get ();
void set (bool value);
}
member ShowMatchingBrace : bool with get, set
function get ShowMatchingBrace () : boolean
function set ShowMatchingBrace (value : boolean)
Property Value
Type: System.Boolean
Returns true if the matching language pair is shown in the status bar; otherwise, returns false.
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
Examples
[ProvideLanguageService(typeof(MyLanguageService), // Required
MyConstants.languageName, // Required
MyConstants.languageNameResourceID, // Required
// Optional language service properties
ShowMatchingBrace = true, // show matching brace in status bar
)]
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
ProvideLanguageServiceAttribute Class