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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:20:04+00:00 2026-05-23T13:20:04+00:00

How do you handle when the editor (xaml / design) in visual studio throws

  • 0

How do you handle when the editor (xaml / design) in visual studio throws an argumentnullexception, “value cannot be null” ?

I am reading some values from the database using entity framework and storing them in an observable collection so I can bind to them from xaml. It is logic to suppose that there might not be any values in the collection so the exception is correct, right?
Even if I have values in the database, the exception is still thrown because the editor (when viewing in design mode) is not running the application to get the values, which is still normal.

When I run the application, everything works fine but the exception is very annoying.

I also get an error, using a try catch when reading from the database, but only in editor (xaml) not when running the application, that says “The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid. The stacktrace gets me into the entity data model itself. I am using mysql as a backend.
This messagebox with the error is thrown everytime I type something (a character) in xaml !

My unit and integration tests all work fine.

Btw is this normal ?

EDIT:
If I add the initialization of the viewmodel in the app resources (in app.xaml.cs but not in the app.xaml) it seems to work. I don’t see the errors when I write the code in xaml or when I switch to design to see how it looks.

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

    You can design some sample data for the design mode so that you can see the designer and write code in xaml without any designer exception. For this, you might need to use DesignerProperties class (e.g DesignerProperties.GetIsInDesignMode(this) etc). I have faced similar XAML designer crush and solved using this technique. I would recommend reading this guideline for further assistance.

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

Sidebar

Related Questions

For a rich text editor that has to handle pasted HTML code from MS
We've written a plugin to the Xinha text editor to handle footnotes. You can
Does your software handle newline characters from other systems? Linux/BSD linefeed ^J 10 x0A
How does one handle a DateTime with a NOT NULL ? I want to
I'm looking for good WYSIWYG editor, which can handle image and file uploads as
I have a generic editor in ASP.NET page for editing lookup values for different
I'am doing a simple text editor that I need to handle creating paragraphs. Paragraphs
I am trying to learn XML by reading from W3schools. I am already at
How to handle personal stress caused by utterly incompetent and lazy co-workers?
Given a handle of type HWND is it possible to confirm that the handle

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.