Reputation: 5141
There are properties that I want to not be editable via the property grid, but I still want them to be visible, even expandable.
How do I do this?
Upvotes: 2
Views: 535
Reputation: 30097
you can use [ReadOnly(true)]
attribute on properties which you want to make read only like this
[ReadOnly(true)]
public int ReadOnlyProperty
{
get
{
return _ReadOnlyProperty;
}
set
{
_ReadOnlyProperty = value;
}
}
Upvotes: 3