Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inherit a control
Message
General information
Forum:
ASP.NET
Category:
.NET Compact Framework
Title:
Inherit a control
Miscellaneous
Thread ID:
01013626
Message ID:
01013626
Views:
49
I created a very simple class:
using System;

namespace SmartDeviceApplication1
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	public class Class1:System.Windows.Forms.Button
	{
		public Class1()
		{
			//
			// TODO: Add constructor logic here
			//
			base.BackColor = System.Drawing.Color.Red;
		}
	}
}
Now I want to use my new button (Class1) in my PPC app. So I add a standard button to the designer and change the System.Windows.Forms.Button to Class1 in the code (when creating a PC app I am used to this working). When I go back to the designer the button is gone and if I build the app and run the exe the button is there and is indeed red.

I guess there should be a question in here: How can I inherit from a control and use the new inherited control in my PPC app?
I did the same thing in a PC app and the button turned red in the designer and did not disapear.

And help/information would be appreciated.

Thanks,
Einar
Semper ubi sub ubi.
Next
Reply
Map
View

Click here to load this message in the networking platform