Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3798882
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:38:41+00:00 2026-05-19T13:38:41+00:00

Why do I have this error message for a UserControl: Partial declaration of MyNamespace.MyUserControl

  • 0

Why do I have this error message for a UserControl:

Partial declaration of
MyNamespace.MyUserControl must not
specify different base classes

Just because I inherited from another UserControl class I created in another namespace whereas this other namespace is referenced in the XAML as

xmlns:my="clr-namespace:ReferedNamespace;assembly=ReferedNamespace"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T13:38:42+00:00Added an answer on May 19, 2026 at 1:38 pm

    Little to go on here, but this usually happens when the code behind and the xaml file do not inherit from the same base class.

    Since we do not have all the details concerning your problem,
    I’ll create a situation that will cause the same exception to be thrown,
    this might help you understand your problem.

    As an example, just create new WPF application using Visual Studio,
    The XAML might look something like this:

    <Window x:Class="WpfApplication1.MainWindow" .....>
    

    The code behind would then contain something like this:

    public partial class MainWindow : Window
    {
        //Code here
    }
    

    Note the ‘partial’ modifier here. It means this class (MainWindow) might
    not be defined in a single file but spread out across multiple files,
    in this case the XAML (.xaml.cs) and the CS (.cs) files.

    Now add a new UserControl to the solution. It will be named UserControl1.

    Without making any changes to the XAML, change the code behind for the MainWindow:

    public partial class MainWindow : UserControl1
    {
        //Code here
    }
    

    Now you’ll get the exception you questioned about.

    Look for something like this in your code, if you still can’t find a solution,
    please provide more code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got this error when using Enterprise Library 3.1 May 2007 version. We
I get this error:- You have an error in your SQL syntax; check the
I have been trying to get around this error for a day now and
NHibernate is driving me 'Nuts'!!! I have the following mapping. Which returns this error
I have limited experience with .net. My app throws an error this.dateTimeFormat is undefined
I have a list of error codes I need to reference, kinda like this:
I've tried this both with and without the 'ExceptionType' parameter. I have an Error.aspx
I have a macro that looks like this: #define coutError if (VERBOSITY_SETTING >= VERBOSITY_ERROR)
I wrote this code I have these errors Cannot implicitly convert type x.Program.TreeNode' to
Hi guys I wrote this code and i have two errors. Invalid rank specifier:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.