can't edit properties on custom attribute types
Posted: Wed 28 Dec 2011 18:03
I have the following attribute type:
It has a single, public property with the following enum type:
In the user-interface, the BinderMode property doesn't show, so I can't edit it's value.
What gives?
Code: Select all
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class BinderAttribute : Attribute
{
/// <summary>
/// Specifies the kind of binding to perform on the property.
/// </summary>
public BinderMode Mode { get; set; }
public BinderAttribute()
{
Mode = BinderMode.Reference;
}
/// <summary>
/// Initializes a new instance of the <see cref="BinderAttribute"/> class.
/// </summary>
public BinderAttribute(BinderMode mode)
{
Mode = mode;
}
}
Code: Select all
public enum BinderMode
{
/// <summary>
/// Bind the property as a reference to another entity.
/// </summary>
Reference = 1,
/// <summary>
/// Bind the property as a list of references to another type of entity.
/// </summary>
MultiReference =2,
/// <summary>
/// Bind the property as a contained entity, belonging to the entity to which the property belongs.
/// </summary>
Contained = 3
}
What gives?