我一直在面对一个错误,告诉我部分声明不能指定不同的基类。'Triangle.MainWindow'的部分声明不能指定不同的基类
public partial class MainWindow : Shape
{
public MainWindow()
{
InitializeComponent();
this.Stretch = System.Windows.Media.Stretch.Fill;
this.StrokeLineJoin = PenLineJoin.Round;
}
我得到错误:
public partial class MainWindow : Shape
的“主窗口”给我的错误一个不同基地的指定。我如何去纠正这个错误?
我的XAML目前,是默认的一个:
<Window x:Class="Triangle.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
</Grid>
</Window>
我还没有从XAML EDOT什么,因为这代码是我发现某处从网上代号,并且用它来试试它是否工作。