ReplacesAttribute Class

Definition

Specifies the name(s) of an asset(s) that will be replaced by this asset.

public ref class ReplacesAttribute sealed : Microsoft::VisualStudio::Utilities::MultipleBaseMetadataAttribute
public ref class ReplacesAttribute sealed : Microsoft::VisualStudio::Utilities::MultipleBaseMetadataAttribute
public sealed class ReplacesAttribute : Microsoft.VisualStudio.Utilities.MultipleBaseMetadataAttribute
type ReplacesAttribute = class
    inherit MultipleBaseMetadataAttribute
Public NotInheritable Class ReplacesAttribute
Inherits MultipleBaseMetadataAttribute
Inheritance

Remarks

You can specify multiple Replaces attributes if you want to replace multiple assets.

An asset must have a different Name attribute than its Replaces attribute (otherwise it would "replace" itself, preventing it from being created).

An asset is not created if its Name attribute matches the Replaces attribute of any other asset that would -- excluding this check -- be created. For margin providers, the means that a provider must match the view's ContentType and TextViewRole before it can replace another provider.

Constructors

ReplacesAttribute(String)

Creates a new instance of the ReplacesAttribute.

ReplacesAttribute(String, Boolean)

Creates a new instance of the ReplacesAttribute.

Properties

Replaces

The name of the replaced asset.

ReplacesOnlyIfCreated

Indicates that this asset should replace assets specified in Replaces only if it can be created.

Applies to