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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing Default Value of a property

Thread ID:




25278 Feb 23,2005 04:06 PM UTC WinForms 0
Tags: FAQ
Cheunhui Wang
Asked On February 23, 2005 04:06 PM UTC

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,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon