How to Implement our own base class for Silverlight 3.0 user controls ?

How we can implement to silver light project?

UserControl.cs
---------------
public class UserControlBase : UserControl
{

public UserControlBase()
{
}

}

TextControl.xaml.cs
-------------------
public partial class TestControl : UserControlBase
{
public TestControl()
{
InitializeComponent();
}
}

Error:-
------
Error 1 Partial declarations of 'BaseClassTest.TestControl' must not specify different base classes C:\ TestControl.xaml.cs 15 26 BaseClassTest

Please help me with that problem
Jaya1983Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MaffeCommented:
Looks like the parts of TestControl inherits from two different classes. ;o) You should use the same base class.

Check all partial definitions and fix it.
0
Rob SiklosCommented:
In TextControl.xaml, make sure the root tag is <UserControlBase>, and not <UserControl>.

This will make sure that the generated code (hidden *.g.cs files) also inherit from UserControlBase
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rob SiklosCommented:
I don't think this question should be deleted.  I have seen this problem many times - my solution is valid and correct, and could be helpful to others with the same problem.
0
Rob SiklosCommented:
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.