Share via


Property Element for Class for ManagedLibrary (ProxyGen)

Represents a property that is defined in a proxy type for a managed type.

<Property isExternal = "true/false"
    isExcluded = "true/false"
    isStatic = "true/false"
    newName = "Name of property in proxy type"
    originalName = "Name of original property ">
  <Attribute>...</Attribute>
  <DeclaringType>...</DeclaringType>
  <Get>...</Get>
  <Parameter>...</Parameter>
  <ReturnValueAttribute>...</ReturnValueAttribute>
  <Set>...</Set>
  <Type>...</Type>
</Property>

ManagedProperty_Type

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

isExternal

Optional xs:boolean attribute.

true to declare the property using the extern keyword; otherwise, false. The default is false.

isExcluded

Optional xs:boolean attribute.

true to omit the property from the proxy code; false to include the property in the proxy code. The default is false.

isStatic

Optional xs:boolean attribute.

true to declare the property using the static keyword; otherwise, false. The default is false.

newName

Optional name_Type attribute.

The new name of the property in the proxy code.

originalName

Required name_Type attribute.

The name of the original property in the host application's object model.

Child Elements

Element

Description

Attribute

Optional Attribute_Type element.

Represents an attribute that is applied to the property.

DeclaringType

Optional TypeReference_Type element.

Represents the interface or base type in which the property is declared, if the property is an explicit interface implementation or an override. The type cannot be an array.

Get

Optional element.

Represents the get accessor of the property.

Parameter

Optional Parameter_Type element.

Represents a parameter of the property.

ReturnValueAttribute

Optional Attribute_Type element.

Describes an attribute applied to the return value of the property.

Set

Optional element.

Represents the set accessor of the property.

Type

Optional TypeReference_Type element.

Describes the type of the property. The type cannot be an array.

Parent Elements

Element

Description

Class

Represents a proxy class for a managed class.

Interface

Represents a proxy interface for a managed interface.

Struct

Represents a proxy struct for a managed struct.

Example

The following example demonstrates a Property element that represents a property named BackgroundColor.

<Property originalName="BackgroundColor" isExcluded="false">
  <Type>
    <TypeReference type="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.Color" />
  </Type>
  <Get isExcluded="false" />
  <Set isExcluded="false" />
</Property>

Element Information

Namespace

https://schemas.microsoft.com/vsta/2008/01/ProxyGenDescriptor

Schema name

ProxyGen Descriptor

Validation file

ProxyGenDescriptorv2.xsd

Can be empty

Yes

See Also

Concepts

ProxyGen Descriptor Schema Reference

Creating Proxies

Defining Entry Points and Other Proxy Changes