You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extensibility/verifying-subtypes-of-a-project-at-run-time.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -15,14 +15,14 @@ manager: douge
15
15
ms.workload:
16
16
- "vssdk"
17
17
---
18
-
# Verifying Subtypes of a Project at Run Time
18
+
# Verify subtypes of a project at run time
19
19
A VSPackage that depends on a custom project subtype should include logic to look for that subtype so that it can fail gracefully if the subtype is not present. The following procedure shows how to verify the presence of a specified subtype.
20
20
21
21
### To verify the presence of a subtype
22
22
23
-
1.Obtain the project hierarchy from the project and solution objects as a <xref:Microsoft.VisualStudio.Shell.Interop.IVsHierarchy> object by adding the following code to your VSPackage.
23
+
1.Get the project hierarchy from the project and solution objects as a <xref:Microsoft.VisualStudio.Shell.Interop.IVsHierarchy> object by adding the following code to your VSPackage.
Copy file name to clipboardExpand all lines: docs/extensibility/visibilityconstraints-element.md
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -17,49 +17,49 @@ manager: douge
17
17
ms.workload:
18
18
- "vssdk"
19
19
---
20
-
# VisibilityConstraints Element
20
+
# VisibilityConstraints element
21
21
The VisibilityConstraints element determines the static visibility of groups of commands and toolbars. The visibility is first controlled by the [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] integrated development environment (IDE) without loading the VSPackage.
22
22
23
23
## Syntax
24
24
25
-
```
25
+
```xml
26
26
<VisibilityConstraints>
27
27
<VisibilityConstraint>... </VisibilityConstraint>
28
28
<VisibilityConstraint>... </VisibilityConstraint>
29
29
</VisibilityConstraint>
30
30
```
31
31
32
-
## Attributes and Elements
32
+
## Attributes and elements
33
33
The following sections describe attributes, child elements, and parent elements.
34
34
35
35
### Attributes
36
36
37
37
|Attribute|Description|
38
38
|---------------|-----------------|
39
-
|Condition|Optional. See [Conditional Attributes](../extensibility/vsct-xml-schema-conditional-attributes.md).|
39
+
|Condition|Optional. See [Conditional attributes](../extensibility/vsct-xml-schema-conditional-attributes.md).|
40
40
41
-
### Child Elements
41
+
### Child elements
42
42
43
43
|Element|Description|
44
44
|-------------|-----------------|
45
-
|[VisibilityItem Element](../extensibility/visibilityitem-element.md)|Determines the static visibility of commands and toolbars.|
45
+
|[VisibilityItem element](../extensibility/visibilityitem-element.md)|Determines the static visibility of commands and toolbars.|
46
46
|[VisibilityConstraints](../extensibility/visibilityconstraints-element.md)|Determines the static visibility of groups of commands and toolbars.|
47
47
48
-
### Parent Elements
48
+
### Parent elements
49
49
50
50
|Element|Description|
51
51
|-------------|-----------------|
52
-
|[CommandTable Element](../extensibility/commandtable-element.md)|Defines all the elements that represent the commands (for example, menu items, menus, toolbars, and combo boxes) that a VSPackage provides to the IDE.|
52
+
|[CommandTable element](../extensibility/commandtable-element.md)|Defines all the elements that represent the commands (for example, menu items, menus, toolbars, and combo boxes) that a VSPackage provides to the IDE.|
Copy file name to clipboardExpand all lines: docs/extensibility/visibilityitem-element.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ manager: douge
15
15
ms.workload:
16
16
- "vssdk"
17
17
---
18
-
# VisibilityItem Element
18
+
# VisibilityItem element
19
19
The `VisibilityItem` element determines the static visibility of commands and toolbars. Every entry identifies a command or menu, and also an associated command UI context. Visual Studio detects commands, menus, and toolbars, and their visibility, without loading the VSPackages that define them. The IDE uses the <xref:Microsoft.VisualStudio.Shell.Interop.IVsMonitorSelection.IsCmdUIContextActive%2A> method to determine whether a command UI context is active.
20
20
21
21
After the VSPackage is loaded, Visual Studio expects command visibility to be determined by the VSPackage rather than the `VisibilityItem`. To determine your command's visibility, you can implement either the <xref:Microsoft.VisualStudio.Shell.OleMenuCommand.BeforeQueryStatus> event handler or the <xref:Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus%2A> method, depending on how you have implemented your command.
@@ -26,14 +26,14 @@ The `VisibilityItem` element determines the static visibility of commands and to
26
26
27
27
## Syntax
28
28
29
-
```
29
+
```xml
30
30
<VisibilityItem
31
31
guid ="="cmdGuidMyProductCommands"
32
32
id=="cmdidAddWidget"
33
33
context="guidNotViewSourceMode"/>
34
34
```
35
35
36
-
## Attributes and Elements
36
+
## Attributes and elements
37
37
The following sections describe attributes, child elements, and parent elements.
38
38
39
39
### Attributes
@@ -43,34 +43,34 @@ The `VisibilityItem` element determines the static visibility of commands and to
43
43
|guid|Required. The GUID of the GUID/ID command identifier.|
44
44
|id|Required. The ID of the GUID/ID command identifier.|
45
45
|context|Required. The UI context in which the command is visible.|
46
-
|Condition|Optional. See [Conditional Attributes](../extensibility/vsct-xml-schema-conditional-attributes.md).|
46
+
|Condition|Optional. See [Conditional attributes](../extensibility/vsct-xml-schema-conditional-attributes.md).|
47
47
48
-
### Child Elements
48
+
### Child elements
49
49
None
50
50
51
-
### Parent Elements
51
+
### Parent elements
52
52
53
53
|Element|Description|
54
54
|-------------|-----------------|
55
-
|[VisibilityConstraints Element](../extensibility/visibilityconstraints-element.md)|The `VisibilityConstraints` element determines the static visibility of groups of commands and toolbars.|
55
+
|[VisibilityConstraints element](../extensibility/visibilityconstraints-element.md)|The `VisibilityConstraints` element determines the static visibility of groups of commands and toolbars.|
56
56
57
57
## Remarks
58
58
The standard Visual Studio UI contexts are defined in the *Visual Studio SDK installation path*\VisualStudioIntegration\Common\Inc\vsshlids.h file as well as in the <xref:Microsoft.VisualStudio.Shell.Interop.UIContextGuids> and <xref:Microsoft.VisualStudio.Shell.Interop.UIContextGuids80> classes. A more complete set of UI contexts is defined in the <xref:Microsoft.VisualStudio.VSConstants> class.
0 commit comments