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 3453646
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:23:55+00:00 2026-05-18T09:23:55+00:00

I want to create my own DataGrid control. Add my project User Control and

  • 0

I want to create my own DataGrid control. Add my project User Control and
derive it from DataGrid but it gives and error in buid.

DataGridControl.xaml.cs :
public partial class DataGridControl : DataGrid
{
…some codes
}

Error : Partial declarations of ‘DataGridControl’ must not specify different base classes .. DataGridControl.g.i.cs

I change this row public partial class DataGridControl : System.Windows.Controls.UserControl to
public partial class DataGridControl : System.Windows.Controls.DataGrid
in DataGridControl.g.i.cs file but it back againg automatically.

How can I solve this problem please help

  • 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-18T09:23:55+00:00Added an answer on May 18, 2026 at 9:23 am

    If you check the DataGrid reference, you can see that it’s inheriting from Control and not UserControl, that’s why you can’t make it the way you wanted.

    What you can do however, is to create a Custom Control, which is just a C# class extending DataGrid. You can then add that to your layout using a XAML namespace include, template using the default DataGrid template as a starting point and implement all the custom functionality you want in your custom class.

    For more info see this tutorial: http://www.silverlightshow.net/items/Creating-a-Silverlight-Custom-Control-The-Basics.aspx

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

Sidebar

Related Questions

I want to create my own user configuration utility targetted for WinCE6 in C++.
I want to create my own RSS/XML feed. I fetch data from the database
I want to create my own routing system with .htaccess , but I have
I want to create my own custom control that is basically a TableLayoutPanel with
I want to create my own control that will consist of several UILabels and
I want to create my own photolibrary that takes images from my library and
I want to create my own number pad to appear after user focus the
I want to create my own hierarchical navigation menu control without using standart ASP.NET
I want to create my own tag, but it doesn't work Component: package com;
I want to create my own WebSocket server, but it will only include a

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.