Freigeben über


ProvideDesignerMetadataAttribute.IsGlobal Property

Gets or sets the scope of the metadata modifications provided by an instance ProvideDesignerMetadataAttribute

Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Declaration
Public Property IsGlobal As Boolean
    Get
    Set
'Usage
Dim instance As ProvideDesignerMetadataAttribute
Dim value As Boolean

value = instance.IsGlobal

instance.IsGlobal = value
public bool IsGlobal { get; set; }
public:
property bool IsGlobal {
    bool get ();
    void set (bool value);
}
member IsGlobal : bool with get, set
function get IsGlobal () : boolean
function set IsGlobal (value : boolean)

Property Value

Type: System.Boolean

  • If the value is true, the scope is global: the modification is applied to all instances of the run time type specified in the ProvideDesignerMetadataAttribute constructor.

  • If the value is false, the scope is local: the modification is applied to all instances of the run time type specified in the ProvideDesignerMetadataAttribute constructor created on the design surface provided by the current VSPackage.

Remarks

At the present time, the design surface only supports creating components, and therefore only components can have local metadata. In the example above, we were attempting to modify a property, such as the Color property of an object. If IsGlobal is set to false , CustomBrowser would never appear because the designer never actually creates an instance of Color. Setting IsGlobal to false is useful for components, such as controls, timers, and dialog boxes.

.NET Framework Security

See Also

Reference

ProvideDesignerMetadataAttribute Class

ProvideDesignerMetadataAttribute Members

Microsoft.VisualStudio.Shell.Design Namespace