【发布时间】:2014-08-28 02:04:55
【问题描述】:
我遇到了一个错误,告诉我部分声明不能指定不同的基类。
public partial class MainWindow : Shape
{
public MainWindow()
{
InitializeComponent();
this.Stretch = System.Windows.Media.Stretch.Fill;
this.StrokeLineJoin = PenLineJoin.Round;
}
我收到错误来自:
public partial class MainWindow : Shape
“MainWindow”给了我关于指定不同基数的错误。我该如何纠正这个错误?
目前我的 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 中编辑任何东西,因为这些代码是我从网上某处找到的代码,并且正在使用它来测试它是否有效。
【问题讨论】: