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 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
  • 1 View
  • 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

Related Questions

I have been having some problems with some variables inside a class being deleted
I have been having this problem and been pulling my hair out over it.
I've been an avid learner of the Python language for quite some time. Having
i need a pointer i the right direction. I have been looking around and
My website has been created with a CSS/HTML frame work that has been integrated
I have an old school ASP (note: not ASP.NET) web site that has a
I have an image in my VB.NET Picture box. I would like to attach
I'm a member of a small but fairly sociable online forum, and just for
I asked at serverfault: How to set up apache with fastcgi and a simple
I'm trying to create a maven plugin to generate a file with the URL

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.