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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:15:57+00:00 2026-05-26T11:15:57+00:00

I have a very simple WPF project comprising a Window and Usercontrol. I’m very

  • 0

I have a very simple WPF project comprising a Window and Usercontrol. I’m very much in a learning phase. It works fine when I run it. However, I am unable to see the form in design time. The problem, I believe is something to do with namespaces, but I don’t understand where. It may well be a simple error

Main Window XML

<Window 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:views="clr-namespace:UserLogin"
    x:Class="UserLogin.MainView"
    x:Name="MainViewWindow"
    mc:Ignorable="d" 
    Title="Login" 
    Height="141" 
    Width="347"
    >

    <Grid>        
        <views:LoginView />
    </Grid>

</Window>

Main Window CodeBehind

Imports Microsoft.VisualBasic
Imports System
Imports System.Windows
Imports UserLogin

Namespace UserLogin

    Partial Public Class MainView
        Inherits System.Windows.Window

        Public Sub New()
            InitializeComponent()
        End Sub

    End Class

End Namespace

Usercontrol XAML

<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             x:Class="UserLogin.LoginView"
             x:Name="LoginViewControl"
             mc:Ignorable="d" d:DesignHeight="96" d:DesignWidth="298">
    <Grid  Height="96" Width="298">
        <Button Command="{Binding OKCommand}" Height="21" Margin="0,0,90,16" Name="btnOK" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="76">OK</Button>
        <Button Command="{Binding CancelCommand}" Height="21" HorizontalAlignment="Right" Margin="0,0,9,16" Name="btnCancel" VerticalAlignment="Bottom" Width="75">Cancel</Button>
        <Label Height="23" HorizontalAlignment="Left" Margin="10,5,0,0" Name="Label1" VerticalAlignment="Top" Width="85">Name:</Label>
        <Label HorizontalAlignment="Left" Margin="10,32,0,0" Name="Label2" Width="85" Height="29" VerticalAlignment="Top">Password:</Label>
        <TextBox Margin="0,31,6,0" Name="txtPassword" Height="22" VerticalAlignment="Top" HorizontalAlignment="Right" Width="182" />
        <ComboBox Height="22" Margin="110,6,6,0" Name="cboNames" VerticalAlignment="Top" />
    </Grid>
</UserControl>

Usercontrol CodeBehind

Imports Microsoft.VisualBasic
Imports System
Imports UserLogin

Namespace UserLogin
    Partial Public Class LoginView
        Inherits System.Windows.Controls.UserControl

        Public Sub New()
            InitializeComponent()
        End Sub

    End Class
End Namespace

I think I’m missing something this namespace

xmlns:views="clr-namespace:UserLogin"

since intellisense doesn’t give me the usercontrol declared within it in the XAML designer but rather reports the error “Unable to load the metadata for the assembly … etc etc”

Thx for any suggestions

Simon

  • 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-26T11:15:58+00:00Added an answer on May 26, 2026 at 11:15 am

    I had this issue and figured it out. I got the error in the designer, but it worked when running the program. In this instance, the source code was on a network drive and that drive did not have full trust permission. I moved the code locally and it started working. You could also add full trust permission if you prefer to keep your code on the network drive.

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

Sidebar

Related Questions

Have a look at this very simple example WPF program: <Window x:Class=WpfApplication1.Window1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
Here's my hypothetical example. I have a very simple WPF window with a one
I have encountered something very strange, simple WPF application <Window x:Class=ListBoxSelection.MainWindow xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Title=MainWindow
I have a very simple WPF application in which I am using data binding
I have a VERY simple 3D space defined in WPF, which defines a 3D
I have very simple window where I have 2 buttons - one for cancel,
I have a very simple WPF user control that is mixed in with a
Im having some problems with binding in wpf/xaml. Have this simple file: <Window x:Class=test.Window1
I'm a newbie with WPF and c# and have a (probably very simple) problem.
I have created a very simple wpf app with mvvm light. I have rows

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.