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

  • SEARCH
  • Home
  • 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 7910901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:03:06+00:00 2026-06-03T13:03:06+00:00

I have a user control. public partial class UserControl1 : UserControl { public UserControl1()

  • 0

I have a user control.

public partial class UserControl1 : UserControl
{
    public UserControl1()
    {
        InitializeComponent();
    }

    public List<Person> People
    {
        get
        {
            return new List<Person>();
        }
        set
        {
            throw new NotImplementedException();
        }
    }
}

If I drag this control onto a Form I get a serialization error. The error changes depending on if I am dragging the control for the first time, deleting the control or whatever. The constant is that if I make Person serializeable then the error goes away. Why does the error occur when dropping an element onto a form? What is the typical fix?

  • 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-06-03T13:03:07+00:00Added an answer on June 3, 2026 at 1:03 pm

    Visual studio will actually do some designer serialization in order to display the UserControl. Since the Person object is not serializable, you get the error. You can either make it serializable or mark the property so the design time serialization will ignore it (see below).

    You can mark the Property as [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] so it doesnt call the property while trying to setup the control in the designer.

    Hidden specifies that a serializer should not serialize the value of the property. This static field is read-only.

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

Sidebar

Related Questions

I have a user control as such: public partial class MyControl : UserControl {
say I have this control: public partial class bloc999 : UserControl { bloc999Data mainBlock
I have a user control that is listening to an event. public partial class
I have the following code: public partial class queryTerm : System.Web.UI.UserControl { private static
I have this custom wpf user control: ShowCustomer.xaml: <UserControl x:Class=TestControlUpdate2343.Controls.ShowCustomer xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml> <Grid> <TextBlock
I have a trivial user control: <UserControl x:Class=Xxx.SimpleUserControl.SimpleTextUserControl xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml x:Name=root> <StackPanel Background=Blue> <TextBlock
I have a really simple user control called SetSpeed: <UserControl x:Class=AGWPFControls.SetSpeed xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml MinHeight=50
I have a user control, has a Frame as a dependency property public partial
I have made the following sample user control: <UserControl x:Class=DLSAdministration.Controls.CombinedTextBoxControl xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:d=http://schemas.microsoft.com/expression/blend/2008 xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006
I have a custom usercontrol with that code: public partial class AudioControl : UserControl

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.