Error thrown when building XAML derived from non-XAML base
Posted: 11 Jun 2014, 01:33
I have a derived class set up like so:
WindowBase.cs
GenericWindow.cs
The GenericWindow XAML file:
Note that WindowBase has no XAML associated with it. It is pure C#, as required by WPF. When I build my Noesis assets, I get the following error:
[error] [DX9] Assets/UI/GenericWindow.xaml
Parsing GameUI.WindowBase (@1,1).
'GameUI.GenericWindow' doesn't inherit from 'GameUI.WindowBase'
-Void OnLog(Int32, System.String) (NoesisBuildToolKernel.cs:194)
-Void Build() (NoesisBuildToolKernel.cs:140)
-Void Build(System.String) (NoesisSettings.cs:276)
Any suggestions for why I am getting this error?
Thanks,
Mark
WindowBase.cs
Code: Select all
[Noesis.Extended]
public class WindowBase : ContentControl
Code: Select all
[Noesis.Extended]
[Noesis.UserControlSource("Assets/UI/GenericWindow.xaml")]
public class GenericWindow : WindowBase
Code: Select all
<local:WindowBase
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:local="clr-namespace:GameUI"
mc:Ignorable="d"
x:Class="GameUI.GenericWindow"
x:Name="WindowBase"
d:DesignWidth="350" d:DesignHeight="296" FontFamily="/GameUI;component/Fonts/#Arial" Content="WindowBase">
<local:WindowBase.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="GameControls.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</local:WindowBase.Resources>
</local:WindowBase>[error] [DX9] Assets/UI/GenericWindow.xaml
Parsing GameUI.WindowBase (@1,1).
'GameUI.GenericWindow' doesn't inherit from 'GameUI.WindowBase'
-Void OnLog(Int32, System.String) (NoesisBuildToolKernel.cs:194)
-Void Build() (NoesisBuildToolKernel.cs:140)
-Void Build(System.String) (NoesisSettings.cs:276)
Any suggestions for why I am getting this error?
Thanks,
Mark