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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:19:37+00:00 2026-05-11T05:19:37+00:00

I have been having real problems getting the WPF designer to work in VS

  • 0

I have been having real problems getting the WPF designer to work in VS 2008 when i use the entity framework. I have a user control that gets data from an entity model. The user control designer loads fine but the main window throws the following error ‘Could not create an instance of type ‘CampaignList’. When i compile the project there is no problem.

I have started using a workaround where i detect when it is in design mode and don’t create an ‘Entities’ object when in design mode. However this seems like a bit of an ugly hack. Is there a better way to do this or do we just have to wait for VS to get updated?

  • 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-11T05:19:38+00:00Added an answer on May 11, 2026 at 5:19 am

    That’s exactly what you need to do. It may seem like an ugly hack, heck it may even be an ugly hack, but that’s exactly how the framework handles design time rendering. Almost every standard framework control (forms, wpf, and web) determines if its being displayed at runtime or design time and behaves differently. That’s the main idea behind component based design. Your classes exist in two different environments–the runtime environment and the design time environment, and they should offer a rich and convenient user experience in both. And the only way to do this is for the control author to code the control to do it.

    Optimally, you’ll want to handle this situation as high up in the stack as possible. Most definitely you’ll want to determine if you’re in design time up in your user control and substitute a dummy data source for the entity framework. You’ll be displaying the kind of fake data you see in some of the databound forms and wpf controls.

    That’s the way its done. VS won’t ever be ‘updated’ as it works as… well, designed.

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

Sidebar

Ask A Question

Stats

  • Questions 189k
  • Answers 190k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Just as a refresher of terminology, in Q-learning, you are… May 12, 2026 at 5:53 pm
  • Editorial Team
    Editorial Team added an answer Zend will redirect to ErrorController if it is set. By… May 12, 2026 at 5:53 pm
  • Editorial Team
    Editorial Team added an answer You can try Boomerang; you will need to build it… May 12, 2026 at 5:53 pm

Related Questions

Update 3 (Read This First) : Yes, this was caused by the object profile
I have set up a dialog with several tabs. One of these contains twenty
I've done most of my coding on smaller projects for myself and classes, and
Since there is a large pool of passionate developers in this community, I would

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.