【发布时间】:2012-04-04 12:18:29
【问题描述】:
我看到许多其他人在其他问题中询问此错误消息,但我似乎对自己解决此问题的方法了解不够。我通过 WPF UserControl 创建了这个错误
public partial class EnterNewRequest : UserControl
但后来我想向 UserControl 添加一个方法,所以我使用继承将它粘贴在那里(不能使用扩展,因为我需要覆盖这个方法)。但是现在我的用户控件很不高兴,我不确定我需要更改 xaml 中的哪些内容。 UserControl 更改块位于命名空间 RCO_Manager 中。这是我的 xaml:
<UserControl x:Class="RCO_Manager.EnterNewRequest"
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"
【问题讨论】:
-
错误是什么?我从未听说过
WindowIsUpsetException。不过看起来很可怕! -
@Baboon 在 msdn 上查看,它基于 WindowsCantReadMyMindAndMagicallyFixThis 类。
-
InnerException是什么? -
@Baboon 哦,你想知道错误。我虽然你在问题标题中说它只是在开玩笑。这是“部分声明不得指定不同的基类”,是编译器错误
标签: c# wpf xaml inheritance