【发布时间】:2015-01-14 02:43:28
【问题描述】:
我正在尝试更改已添加到项目中的 Window 的基类。
这里有一些代码:
public partial class MoviesView : MvvmHelper.Base.ViewBase
{
public MoviesView()
{
InitializeComponent();
}
}
还有 XAML:
<Mvvm:ViewBase x:Class="MvvmHelperUI.Views.MoviesView"
xmlns:Mvvm="clr-namespace:MvvmHelper.Base"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MoviesView" Height="300" Width="300">
<Grid>
</Grid>
</Mvvm:ViewBase>
我收到错误消息:
The name "ViewBase" does not exist in the namespace "clr-namespace:MvvmHelper.Base".
还有:
The tag 'ViewBase' does not exist in XML namespace 'clr-namespace:MvvmHelper.Base'.
基类ViewBase目前还没有实现,它只继承自Window。它肯定存在于命名空间中,我不知道这个问题可能是什么。
值得一提的是,ViewBase 位于不同的程序集中。
【问题讨论】: