...My original answer was pretty far off so I'm revamping the entire thing in this update...
Here's what I would do if I needed to meet this requirement.
Create an attribute that will be used to pre-define the Tag value of your GridItem; let's call it TagAttribute. It could be as simple as this:
public class TagAttribute : Attribute
{
public string TagValue { get; set; }
public TagAttribute ( string tagValue )
{
TagValue = tagValue;
}
}
To pre-define the Tag value, you would just need to decorate the desired property with this attribute.
public class MyAwesomeClass
{
...
[TagAttribute( "This is my tag value." )]
[CategoryAttribute( "Data" )]
public string MyAwesomeProperty { get; set; }
...
}
I would then inherit the PropertyGrid and override the OnPropertyValueChanged event in order to set the Tag property of the GridItem to coincide with the pre-defined TagAttribute.
public partial class InheritedPropertyGrid : PropertyGrid
{
...
protected override void OnPropertyValueChanged ( PropertyValueChangedEventArgs e )
{
var propertyInfo = SelectedObject.GetType().GetProperty( e.ChangedItem.PropertyDescriptor.Name );
var tagAttribute = propertyInfo.GetCustomAttributes( typeof( TagAttribute ) , false );
if ( tagAttribute != null )
e.ChangedItem.Tag = ( (TagAttribute)tagAttribute[0] ).TagValue;
base.OnPropertyValueChanged( e );
}
...
}
Now when you hook into the OnPropertyValueChanged of this "InheritedPropertyGrid", the Tag property will be set to what you defined on the property.