Skip to content

Commit 84e6d86

Browse files
author
Lennart Brüggemann
authored
Update how-to-use-rule-based-ui-context-for-visual-studio-extensions.md
Fix naming mismatch "guidTestUIContext" => "UIContextGuid"
1 parent ad933de commit 84e6d86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/extensibility/how-to-use-rule-based-ui-context-for-visual-studio-extensions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ Rule-based UI Context can be used in various ways:
6464

6565
```xml
6666
<VisibilityConstraints>
67-
<VisibilityItem guid="guidTestPackageCmdSet" id="TestId" context="guidTestUIContext"/>
67+
<VisibilityItem guid="guidTestPackageCmdSet" id="TestId" context="UIContextGuid"/>
6868
</VisibilityConstraints>
6969
```
7070

7171
4. In the Symbols section, add the definition of the UIContext:
7272

7373
```xml
74-
<GuidSymbol name="guidTestUIContext" value="{8B40D5E2-5626-42AE-99EF-3DD1EFF46E7B}" />
74+
<GuidSymbol name="UIContextGuid" value="{8B40D5E2-5626-42AE-99EF-3DD1EFF46E7B}" />
7575
```
7676

7777
Now, the context menu commands for *\*.config* files will be visible only when the selected item in the solution explorer is a *.config* file and the package will not be loaded until one of those commands is selected.
@@ -146,4 +146,4 @@ Sometimes, packages cannot use static UI Context rules. For example, suppose you
146146

147147
In order to support such packages, rule-based UI Contexts support a hardcoded expression "*" that indicates all the terms below it will be joined with OR. This allows for the master package to define a known rule-based UI Context and tie its command state to this context. Afterwards any MEF extension targeted for the master package can add its terms for editors it supports without impacting other terms or the master expression.
148148

149-
The constructor <xref:Microsoft.VisualStudio.Shell.ProvideExtensibleUIContextRuleAttribute.%23ctor%2A> documentation shows the syntax for extensible UI Context rules.
149+
The constructor <xref:Microsoft.VisualStudio.Shell.ProvideExtensibleUIContextRuleAttribute.%23ctor%2A> documentation shows the syntax for extensible UI Context rules.

0 commit comments

Comments
 (0)