Different base class in the XAML file

I have a class called BIFUserControl which inherits from UserControl class. Now I am designing a new user control called BIFText which inherits from BIFUserControl class. So, I changed the XAML file called BIFText.xaml as follows :

<base:BIFUserControl 
              xmlns:base="clr-namespace:BaseInputFramework.BaseWidgets;assembly=BaseInputFramework"
              x:Class="BIFWidgetLibrary.Text.BIFText"
              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" 

              xmlns:mp="clr-namespace:Microsoft.Multipoint.Sdk.Controls;assembly=Microsoft.Multipoint.Sdk.Controls"
              xmlns:utils="clr-namespace:BaseInputFramework.BaseWidgets.Utils;assembly=BaseInputFramework"

              mc:Ignorable="d" 
              d:DesignHeight="150" d:DesignWidth="150">
     <Grid>


     </Grid> </base:BIFUserControl>

And then I changed my BIFText.xaml.cs file as follows:

 namespace BIFWidgetLibrary.Text {
     public partial class BIFText : BIFUserControl
     {
         public BIFText()
         {
             InitializeComponent();
         }
     } }

But now when I try to build the project, I get the following error message : 'BaseInputFramework.BaseWidgets.BIFUserControl' cannot be the root of a XAML file because it was defined using XAML. Line 2 Position 14.

Can someone please help me with this error. Thanks in advance.

Answers


Error says itself that BaseInputFramework.BaseWidgets.BIFUserControl cannot be root of a XAML file since it is defined using XAML. Only elements which are not defined using XAML file can only be root element. Refer to these links - Cannot define root element and Inheriting from UserControl


Need Your Help

Disable sessions in Tomcat 6 for JSP

java session tomcat6

How can I configure tomcat to disable sessions in JSP? In each JSP file I can write

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.