Possible Duplicate:
Inheriting from a UserControl in WPF
I'm trying to create a WPF user control, which is derived from an other user control, which I also have defined.
<myNamespace:NavigationControl
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:myNamespace="clr-namespace:myNamespace" mc:Ignorable="d"
x:Class="myNamespace.WelcomeScreen"
x:Name="UserControl"
d:DesignWidth="640" d:DesignHeight="480">
and here's what WelcomeScreen.cs looks like:
public partial class WelcomeScreen : NavigationControl
{
public WelcomeScreen()
{
this.InitializeComponent();
}
}
When I compile this, I get following error:
'myNamespace.NavigationControl' cannot be the root of a XAML file because it was defined using XAML.
What am I doing wrong?