LanguagePreferences.EnableShowMatchingBrace Property
Gets or sets whether or not the text included in the span of the matching pair is shown in the status bar.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
'宣言
Public Property EnableShowMatchingBrace As Boolean
public bool EnableShowMatchingBrace { get; set; }
Property Value
Type: System.Boolean
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.
.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.