Value cannot be null. Parameter name: existingConnection

Lakshman Balasubramanian 21 Reputation points
2024-04-19T13:16:45.13+00:00

Hi,

I am quite new to Visual Studio development and I am working on a hobby project using WPF application with C#. I currently exploring User Control in WPF application. So, I have a project named "wpfLearnMainWin" say parent project (that has app.xaml and mainWindow.xaml), and an other project named "wpfLearnUserCon" say child project. This child project has several user controls such as "newItem.xaml", "settings.xaml", "about.xaml", "info.xaml".

In the mainWIndow.xaml, I have used a "Tab Control" where each tabs takes us to "new item", "about", "settings" and "info". So, in the mainwindow, if I click "settings", it should load the "settings.xaml" user control in the settings section. I have dragged and dropped the "settings" user control into the mainwindow under the settings tab section.

But, here I am facing an issue and the issue is "Value cannot be null. Parameter name: existingConnection".

In the mainWindow.xaml code, this particular line has this blue curly lines and shows

User's image

The error is attached below.
User's image In fact, in the designer window it shows an "x" mark like the image below.

User's image

Can someone help me with this regard? TIA

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,477 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,690 questions
{count} votes