ProvideUIContextRuleAttribute Constructor (String^, String^, String^, array<String^>^, array<String^>^, UInt32)
Visual Studio 2015
Creates a rule based UI context entry that is activated when the expression is evaluated to true.
Assembly: Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)
public: ProvideUIContextRuleAttribute( String^ contextGuid, String^ name, String^ expression, array<String^>^ termNames, array<String^>^ termValues, unsigned int delay = 0 )
Parameters
- contextGuid
-
Type:
System::String^
The context GUID.
- name
-
Type:
System::String^
The name of the rule.
- expression
-
Type:
System::String^
The expression. See Remarks for an example.
- termNames
-
Type:
array<System::String^>^
The names of the terms of the expression.
- termValues
-
Type:
array<System::String^>^
The values of the terms of the expression.
- delay
-
Type:
System::UInt32
The delay.
An example rule is as follows:
ContextGuid: {e551fe48-4b78-4dc4-9ddc-183cbfea7d5b}
Expression: VB | CS
TermNames: { VB, CS },
TermValues: { ActiveEditorContentType:VB, ActiveEditorContentType:CS }
Delay: 500
This creates a new UI context that is activated 500 ms after when active editor is either a C# or VB file
Show: