ProvideLanguageServiceAttribute.MatchBraces Property
Determines if the language service supports matching language pairs.
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 MatchBraces As Boolean
Get
Set
'Utilisation
Dim instance As ProvideLanguageServiceAttribute
Dim value As Boolean
value = instance.MatchBraces
instance.MatchBraces = value
public bool MatchBraces { get; set; }
public:
property bool MatchBraces {
bool get ();
void set (bool value);
}
member MatchBraces : bool with get, set
function get MatchBraces () : boolean
function set MatchBraces (value : boolean)
Property Value
Type: System.Boolean
Returns true if matching language pairs is supported; otherwise, returns false.
Remarks
All computer languages support what can be called language pairs such as '{' and '}', '(' and ')', or '<' and '>'. It is possible to position the caret after an element of a language pair and type Ctrl-] to jump to the corresponding matching pair. A language service indicates its support for matching language pairs in this manner by setting the MatchBraces property to true. To indicate support for matching pairs while typing, the MatchBracesAtCaret property must also be set to true.
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]\
MatchBraces = reg_dword: 0x00000001
Examples
[ProvideLanguageService(typeof(MyLanguageService), // Required
MyConstants.languageName, // Required
MyConstants.languageNameResourceID, // Required
// Optional language service properties
MatchBraces = true, // brace matching is supported
)]
.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