We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Changing Default Value of a property

Most properties have a default value. I was curious if it''s posible to change tje default value during run time. I tried to Get the PropertyDescriptor from the type, then find the DefaultValueAttribute. Change this attribute by creating a new instance of DefaultValueAttribute (as the Value field is read only). However, this doesn''t do anything. The end goal is to 1. Be able to make any existing form as the default form, so that next time a new form is created, it uses the new default property set. 2. When a property grid is used on the Form, the new default values should be displayed as default (not in bold text). Any thoughts would be geat. Thanks,

Loader.
Live Chat Icon For mobile
Up arrow icon