locked
The tag 'DisplayObject' does not exist in XML namespace RRS feed

  • Question

  • I have a class called DisplayObject, its namespace is SilverlightClasses.Display
    This is in a .dll file called SilverlightClasses.dll

    I created a new project called InfluencecTest.When I try to create a Button and have it inherit from the DisplayObject class, I run into problems

    1. I drag a button on the stage area and convert into a new UserControl (DoButton)
    2. I open up DoButton.cs

     public partial class DoButton : DisplayObject
     {
      public DoButton()
      {

    3. I open up DoButton.xaml, and have it extend the DisplayObject class, take note of the myClassPath namespace


    <myClassPath:DisplayObject
     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:myClassPath ="clr-namespace:SilverlightClasses.Display;assembly=SilverlightClasses"
     mc:Ignorable="d"
     x:Class="InfluenceTest.DoButton"
     d:DesignWidth="166" d:DesignHeight="41">

     <Grid x:Name="LayoutRoot">
      <Button Content="Button"/>
     </Grid>
    </myClassPath:DisplayObject>

    4. This doesn't work: error below, what am I doing wrong. DisplayObject does in fact exist because I can instatiate it directy inside any .cs file, xaml is the one that gives me problems

    Error 1 The tag 'DisplayObject' does not exist in XML namespace 'clr-namespace:SilverlightClasses.Display;assembly=SilverlightClasses'. 

    Wednesday, August 18, 2010 10:10 AM

All replies

  • Hi,

    Please try to build and run the project, then check if your project runs well.  Sometimes the designer has some problem to identify a control in an assembly.

    Thursday, August 19, 2010 11:03 PM
  • Hi, I tried that and it doesn't work. My friend was able to run this project fine in Visual Studio 2010. I have Web Developer 2010 express and I get this error. Why is this?

    Friday, August 20, 2010 9:35 AM