I'm currently implementing a completely generic Tools | Options dialog as you find in Visual Studio. So, for any object in my system, I want to be able to load/save default values (Options).
I am aware that the PropertyGridItem.Rest() method uses the PropertyGridItem.DefaultValue property to reset a bound property to it's default value. I'm PropertyGridItem.DefaultValue is initialized via the System.ComponentModel.DefaultValueAttribute on the bound property.
Is there some way to force PropertyGridItem.DefaultValue to get it's value from another source? I'd like my user specified default value from my Tools | Options mechanism to be used.
Thoughts?
I am aware that the PropertyGridItem.Rest() method uses the PropertyGridItem.DefaultValue property to reset a bound property to it's default value. I'm PropertyGridItem.DefaultValue is initialized via the System.ComponentModel.DefaultValueAttribute on the bound property.
Is there some way to force PropertyGridItem.DefaultValue to get it's value from another source? I'd like my user specified default value from my Tools | Options mechanism to be used.
Thoughts?