In one project I have an Editor Class:
namespace TestXamlInherit234
{
public class CustomerEditor : BaseEditor
{
public CustomerEditor()
{
TheMessage.Text = "changed222";
}
}
}
which inherits from a WPF User Control in another project:
using System.Windows.Controls;
namespace Core
{
public partial class BaseEditor : UserControl
{
public TextBlock TheMessage
{
get
{
return TheMessage2;
}
}
public BaseEditor()
{
InitializeComponent();
}
}
}
<UserControl x:Class="Core.BaseEditor"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="300" Width="300">
<Grid>
<TextBlock x:Name="TheMessage2" Text="This is in the base editor"/>
</Grid>
</UserControl>
This works when both classes are in the same project but when they are in two different projects, I get a XamlParseException error.