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

The Archive Base Latest Questions

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

I have a .NET 2.0 windows forms app, which makes heavy use of the

  • 0

I have a .NET 2.0 windows forms app, which makes heavy use of the ListView control.

I’ve subclassed the ListView class into a templated SortableListView<T> class, so it can be a bit smarter about how it displays things, and sort itself.

Unfortunately this seems to break the Visual Studio Forms Designer, in both VS2005 and 2008.

The program compiles and runs fine, but when I try view the owning form in the designer, I get these Errors:

  • Could not find type ‘MyApp.Controls.SortableListView’. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built.

There is no stack trace or error line information available for this error

  • The variable ‘listViewImages’ is either undeclared or was never assigned.

At MyApp.Main.Designer.cs Line:XYZ Column:1

Call stack: at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)  

The line of code in question is where it is actually added to the form, and is

this.imagesTab.Controls.Add( this.listViewImages ); 

listViewImages is declared as

private MyApp.Controls.SortableListView<Image> listViewImages; 

and is instantiated in the InitializeComponent method as follows:

this.listViewImages = new MyApp.Controls.SortableListView<Image>(); 

As mentioned earlier, the program compiles and runs perfectly, and I’ve tried shifting the SortableListView class out to a seperate assembly so it can be compiled seperately, but this makes no difference.

I have no idea where to go from here. Any help would be appreciated!

  • 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. 2026-05-10T13:41:50+00:00Added an answer on May 10, 2026 at 1:41 pm

    when you added the listview, did you add it to the toolbox and then add it to the form?

    No, I just edited Main.Designer.cs and changed it from System.Windows.Forms.ListView to MyApp.Controls.SortableListView<Image>

    Suspecting it might have been due to the generics led me to actually finding a solution.

    For each class that I need to make a SortableListView for, I defined a ‘stub class’ like this

    class ImagesListView : SortableListView<Image> { } 

    Then made the Main.Designer.cs file refer to these stub classes instead of the SortableListView.

    It now works, hooray!

    Thankfully I am able to do this because all my types are known up front, and I’m only using the SortableListView as a method of reducing duplicate code.

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

Sidebar

Ask A Question

Stats

  • Questions 72k
  • Answers 72k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I am not clear what you are after, but does… May 11, 2026 at 1:47 pm
  • added an answer $('input#id').removeClass('cssText').addClass('blck'); or $('input#id').attr('class', 'blck'); May 11, 2026 at 1:47 pm
  • added an answer I used Delphi Language Coding Standards Document as a basis… May 11, 2026 at 1:47 pm

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.