Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How does Visual Inheritance work in .Net?
Message
From
19/06/2007 16:07:34
 
 
To
19/06/2007 15:39:05
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01234107
Message ID:
01234382
Views:
12
Calvin,

If you've got it working the way you want, that's fine....but I believe the following is what's best (to start from scratch)...
public class MyLabel : Label
{

	DefaultValue(typeof(Font),"Verdana,8pt")]
	override public Font Font
	{
	   get { return base.Font; }
	   set { base.Font = value; }
	}

	public MyLabelClass()
	{
	     //  base.Font = new  Font("Verdana",8);   // no need for the constructor if you're using defaultvalue attribute
	}
}
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform